import os os.system("pip uninstall -y gradio") os.system("pip install gradio --upgrade") import gradio as gr import pandas as pd def display_csv(file_path): # Load the CSV file using pandas df = pd.read_csv(file_path) # Convert the dataframe to HTML table html_table = df.to_html(index=False) return html_table # Hardcoded file path file_path = "merged-averaged-model_timings_2.1.0_12.1_NVIDIA_A10G_False.csv" # Call the display_csv function with the hardcoded file path html_table_output = display_csv(file_path) # Create the Gradio interface gr.Interface(fn=lambda: None, inputs=None, outputs=gr.outputs.HTML(html_table_output), title="CSV Viewer").launch()