Spaces:
Runtime error
Runtime error
slight refactor in markdown
Browse files
app.py
CHANGED
@@ -7,13 +7,7 @@ suite = evaluate.EvaluationSuite.load("Vipitis/ShaderEval") #downloads it
|
|
7 |
# from ShaderEval import Suite
|
8 |
# suite = Suite("Vipitis/ShaderEval")
|
9 |
|
10 |
-
|
11 |
-
# print(model_cp, snippet)
|
12 |
-
results = suite.run(model_cp, snippet)
|
13 |
-
return results[0]
|
14 |
-
|
15 |
-
with gr.Blocks() as site:
|
16 |
-
text = gr.Markdown("""# Welcome to the ShaderEval Suite.
|
17 |
|
18 |
This space hosts the ShaderEval Suite. more to follow soon.
|
19 |
|
@@ -38,7 +32,7 @@ with gr.Blocks() as site:
|
|
38 |
|
39 |
### try the demo below
|
40 |
- Select a **model checkpoint** from the "dropdown"
|
41 |
-
- Select how many **samples** to run (there us up to
|
42 |
- Click **Run** to run the suite
|
43 |
- The results will be displayed in the **Output** box
|
44 |
|
@@ -47,10 +41,19 @@ with gr.Blocks() as site:
|
|
47 |
- supporting batches to speed up inference
|
48 |
- CER metric
|
49 |
- removing the pad_token warning
|
|
|
50 |
"""
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
model_cp = gr.Textbox(value="gpt2", label="Model Checkpoint", interactive=True)
|
53 |
-
first_n = gr.Slider(minimum=1, maximum=
|
54 |
output = gr.Textbox(label="Output")
|
55 |
run_button = gr.Button(label="Run")
|
56 |
run_button.click(fn=run_suite, inputs=[model_cp, first_n], outputs=output)
|
|
|
7 |
# from ShaderEval import Suite
|
8 |
# suite = Suite("Vipitis/ShaderEval")
|
9 |
|
10 |
+
text = """# Welcome to the ShaderEval Suite.
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
This space hosts the ShaderEval Suite. more to follow soon.
|
13 |
|
|
|
32 |
|
33 |
### try the demo below
|
34 |
- Select a **model checkpoint** from the "dropdown"
|
35 |
+
- Select how many **samples** to run (there us up to 200 from the test set)
|
36 |
- Click **Run** to run the suite
|
37 |
- The results will be displayed in the **Output** box
|
38 |
|
|
|
41 |
- supporting batches to speed up inference
|
42 |
- CER metric
|
43 |
- removing the pad_token warning
|
44 |
+
- adding OpenVINO pipelines for inference, pending on OpenVINO release
|
45 |
"""
|
46 |
+
|
47 |
+
|
48 |
+
def run_suite(model_cp, snippet):
|
49 |
+
# print(model_cp, snippet)
|
50 |
+
results = suite.run(model_cp, snippet)
|
51 |
+
return results[0]
|
52 |
+
|
53 |
+
with gr.Blocks() as site:
|
54 |
+
text_md = gr.Markdown(text)
|
55 |
model_cp = gr.Textbox(value="gpt2", label="Model Checkpoint", interactive=True)
|
56 |
+
first_n = gr.Slider(minimum=1, maximum=200, default=15, label="num_samples", step=1.0)
|
57 |
output = gr.Textbox(label="Output")
|
58 |
run_button = gr.Button(label="Run")
|
59 |
run_button.click(fn=run_suite, inputs=[model_cp, first_n], outputs=output)
|