varun4 commited on
Commit
1797aaf
1 Parent(s): 2fc8c67

add application file

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # my_table_app_gradio.py
2
+
3
+ import gradio as gr
4
+ import pandas as pd
5
+
6
+ def display_table():
7
+ # Create a sample dataframe
8
+ data = {
9
+ "Model": ["ModelA", "ModelB", "ModelC"],
10
+ "Score": [0.92, 0.85, 0.89],
11
+ "Quantized Score": [0.91, 0.84, 0.88]
12
+ }
13
+ df = pd.DataFrame(data)
14
+
15
+ # Convert the DataFrame to an HTML table string
16
+ html_table = df.to_html()
17
+
18
+ return html_table
19
+
20
+ # Create Gradio interface
21
+ iface = gr.Interface(fn=display_table, live=True, inputs=[], outputs="html")
22
+
23
+ iface.launch()
24
+