Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,19 +48,21 @@ benchmark_data = {
|
|
48 |
19.35 # Qwen
|
49 |
]
|
50 |
}
|
|
|
|
|
51 |
def display_results():
|
52 |
df = pd.DataFrame(benchmark_data)
|
53 |
return df
|
54 |
-
|
55 |
-
# Create the interface
|
56 |
-
with gr.Blocks() as demo:
|
57 |
-
gr.Markdown("# Model Benchmark Results")
|
58 |
-
|
59 |
-
# Display results in a DataFrame
|
60 |
-
output = gr.Dataframe(
|
61 |
headers=["Model", "Creativity Score", "Coherence Score", "Diversity Score"],
|
62 |
-
interactive=
|
63 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
if __name__ == "__main__":
|
66 |
demo.launch()
|
|
|
48 |
19.35 # Qwen
|
49 |
]
|
50 |
}
|
51 |
+
|
52 |
+
|
53 |
def display_results():
|
54 |
df = pd.DataFrame(benchmark_data)
|
55 |
return df
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
headers=["Model", "Creativity Score", "Coherence Score", "Diversity Score"],
|
57 |
+
interactive=False
|
58 |
)
|
59 |
+
|
60 |
+
# Button to refresh/display results
|
61 |
+
refresh_btn = gr.Button("Show Results")
|
62 |
+
refresh_btn.click(fn=display_results, outputs=output)
|
63 |
+
|
64 |
+
if __name__ == "__main__":
|
65 |
+
demo.launch()
|
66 |
|
67 |
if __name__ == "__main__":
|
68 |
demo.launch()
|