Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,7 @@ sys.path.append(str(test_path))
|
|
18 |
from test_modeling import *
|
19 |
from test_stable_diffusion import *
|
20 |
|
|
|
21 |
|
22 |
def generate_model_list():
|
23 |
tests = []
|
@@ -41,7 +42,7 @@ def generate_model_list():
|
|
41 |
print(cls.SUPPORTED_ARCHITECTURES_WITH_ATTENTION)
|
42 |
d[task] = cls.SUPPORTED_ARCHITECTURES_WITH_ATTENTION + cls.SUPPORTED_ARCHITECTURES_WITH_HIDDEN_STATES
|
43 |
|
44 |
-
with open(
|
45 |
f.write(f"Updated at {datetime.now().strftime('%d %B %Y')}\n\n")
|
46 |
|
47 |
summary = []
|
@@ -62,14 +63,14 @@ def generate_model_list():
|
|
62 |
f.write(f"Total unique architectures: {num_total_archs}\n\n")
|
63 |
f.write(f"Total validated architecture/task combinations: {len(all_archs)}\n\n")
|
64 |
|
65 |
-
return Path(
|
66 |
|
67 |
|
68 |
demo = gr.Interface(
|
69 |
fn=generate_model_list,
|
70 |
title="List of validated architectures for optimum[openvino]",
|
71 |
inputs=[],
|
72 |
-
outputs=[gr.Markdown()],
|
73 |
allow_flagging="never",
|
74 |
)
|
75 |
demo.launch(server_name="0.0.0.0")
|
|
|
18 |
from test_modeling import *
|
19 |
from test_stable_diffusion import *
|
20 |
|
21 |
+
RESULT_FILE = "supported_models.md"
|
22 |
|
23 |
def generate_model_list():
|
24 |
tests = []
|
|
|
42 |
print(cls.SUPPORTED_ARCHITECTURES_WITH_ATTENTION)
|
43 |
d[task] = cls.SUPPORTED_ARCHITECTURES_WITH_ATTENTION + cls.SUPPORTED_ARCHITECTURES_WITH_HIDDEN_STATES
|
44 |
|
45 |
+
with open(RESULT_FILE, "w") as f:
|
46 |
f.write(f"Updated at {datetime.now().strftime('%d %B %Y')}\n\n")
|
47 |
|
48 |
summary = []
|
|
|
63 |
f.write(f"Total unique architectures: {num_total_archs}\n\n")
|
64 |
f.write(f"Total validated architecture/task combinations: {len(all_archs)}\n\n")
|
65 |
|
66 |
+
return Path(RESULT_FILE).read_text(), RESULT_FILE
|
67 |
|
68 |
|
69 |
demo = gr.Interface(
|
70 |
fn=generate_model_list,
|
71 |
title="List of validated architectures for optimum[openvino]",
|
72 |
inputs=[],
|
73 |
+
outputs=[gr.Markdown(), gr.File()],
|
74 |
allow_flagging="never",
|
75 |
)
|
76 |
demo.launch(server_name="0.0.0.0")
|