import pandas as pd import gradio as gr # Create the dataset based on the table you provided data = { "Method": ["GPT-4o", "GPT-4o-mini", "Gemini-1.5-Pro", "Gemini-1.5-Flash", "Qwen2-VL-2B"], "MM Understanding & Reasoning": [57.90, 48.82, 46.67, 45.58, 40.59], "OCR & Document Understanding": [59.11, 42.89, 36.59, 33.59, 25.68], "Charts & Diagram Understanding": [73.57, 64.98, 47.06, 48.25, 27.83], "Video Understanding": [74.27, 68.11, 42.94, 53.31, 38.90], "Cultural Specific Understanding": [80.86, 65.92, 56.24, 46.54, 34.27], "Medical Imaging": [49.90, 47.37, 33.77, 42.86, 29.12], "Agro Specific": [80.75, 79.58, 72.12, 76.06, 52.02], "Remote Sensing Understanding": [22.85, 16.93, 17.07, 14.95, 12.56] } # Convert the dataset into a DataFrame df = pd.DataFrame(data) # Calculate the average score for each model across the different tasks df['Average Score'] = df.iloc[:, 1:].mean(axis=1) # Function to display the data in a Gradio interface def display_data(): return df # Create the Gradio interface with gr.Blocks() as demo: gr.Markdown("# Model Performance Across Various Understanding Tasks") gr.Markdown("This table shows the performance of different models across various tasks including OCR, chart understanding, video, medical imaging, and more. An average score is also calculated for each model.") gr.Dataframe(value=df, label="Model Performance with Average Scores", interactive=False) demo.launch()