ahmedheakl commited on
Commit
f2e3361
β€’
1 Parent(s): b0ee7b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -63
app.py CHANGED
@@ -1,75 +1,26 @@
1
  import pandas as pd
2
  import gradio as gr
3
- import plotly.graph_objects as go
4
 
5
- # Create the DataFrame
6
  data = {
7
- 'Method': ['GPT-4o', 'GPT-4o-mini', 'Gemini-1.5-Pro', 'Gemini-1.5-Flash', 'Qwen2-VL-2B'],
8
- 'MM Understanding & Reasoning': [57.90, 48.82, 46.67, 45.58, 40.59],
9
- 'OCR & Document Understanding': [59.11, 42.89, 36.59, 33.59, 25.68],
10
- 'Charts & Diagram Understanding': [73.57, 64.98, 47.06, 48.25, 27.83],
11
- 'Video Understanding': [74.27, 68.11, 42.94, 53.31, 38.90],
12
- 'Cultural Specific Understanding': [80.86, 65.92, 56.24, 46.54, 34.27],
13
- 'Medical Imaging': [49.90, 47.37, 33.77, 42.86, 29.12],
14
- 'Agro Specific': [80.75, 79.58, 72.12, 76.06, 52.02],
15
- 'Remote Sensing Understanding': [22.85, 16.93, 17.07, 14.95, 12.56]
16
  }
17
 
18
  df = pd.DataFrame(data)
19
 
20
- def plot_performance():
21
- categories = df.columns[1:]
22
- fig = go.Figure()
23
-
24
- for method in df['Method']:
25
- values = df[df['Method'] == method].iloc[0, 1:].tolist()
26
- fig.add_trace(go.Scatterpolar(
27
- r=values,
28
- theta=categories,
29
- fill='toself',
30
- name=method
31
- ))
32
-
33
- fig.update_layout(
34
- polar=dict(
35
- radialaxis=dict(
36
- visible=True,
37
- range=[0, 100]
38
- )),
39
- showlegend=True,
40
- title="Performance Comparison across Categories"
41
- )
42
- return fig
43
-
44
- def create_leaderboard():
45
  return df
46
 
47
- # Define the Gradio interface
48
  with gr.Blocks() as demo:
49
- gr.Markdown("# Multimodal Understanding Leaderboard")
50
-
51
- with gr.Tabs():
52
- with gr.TabItem("πŸ“Š Performance Plot"):
53
- gr.Plot(plot_performance)
54
-
55
- with gr.TabItem("πŸ” Leaderboard Table"):
56
- gr.DataFrame(create_leaderboard)
57
-
58
- with gr.TabItem("πŸ“ About"):
59
- gr.Markdown("""
60
- This leaderboard compares the performance of various models across different categories of multimodal understanding tasks. The scores represent the accuracy or performance metric for each model in the respective category.
61
-
62
- **Categories:**
63
- - MM Understanding & Reasoning
64
- - OCR & Document Understanding
65
- - Charts & Diagram Understanding
66
- - Video Understanding
67
- - Cultural Specific Understanding
68
- - Medical Imaging
69
- - Agro Specific
70
- - Remote Sensing Understanding
71
-
72
- The data is presented both as a radar chart for visual comparison and as a table for detailed viewing.
73
- """)
74
 
75
- demo.launch()
 
1
  import pandas as pd
2
  import gradio as gr
 
3
 
 
4
  data = {
5
+ "Method": ["GPT-4o", "GPT-4o-mini", "Gemini-1.5-Pro", "Gemini-1.5-Flash", "Qwen2-VL-2B"],
6
+ "MM Understanding & Reasoning": [57.90, 48.82, 46.67, 45.58, 40.59],
7
+ "OCR & Document Understanding": [59.11, 42.89, 36.59, 33.59, 25.68],
8
+ "Charts & Diagram Understanding": [73.57, 64.98, 47.06, 48.25, 27.83],
9
+ "Video Understanding": [74.27, 68.11, 42.94, 53.31, 38.90],
10
+ "Cultural Specific Understanding": [80.86, 65.92, 56.24, 46.54, 34.27],
11
+ "Medical Imaging": [49.90, 47.37, 33.77, 42.86, 29.12],
12
+ "Agro Specific": [80.75, 79.58, 72.12, 76.06, 52.02],
13
+ "Remote Sensing Understanding": [22.85, 16.93, 17.07, 14.95, 12.56]
14
  }
15
 
16
  df = pd.DataFrame(data)
17
 
18
+ def display_data():
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  return df
20
 
 
21
  with gr.Blocks() as demo:
22
+ gr.Markdown("# Model Performance Across Various Understanding Tasks")
23
+ gr.Markdown("This table shows the performance of different models across various tasks including OCR, chart understanding, video, medical imaging, and more.")
24
+ gr.Dataframe(value=df, label="Model Performance", interactive=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
+ demo.launch()