Spaces:
Running
Running
File size: 591 Bytes
98b6ea5 4680dfd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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: html_table_output, inputs=None, outputs=html_table_output, title="CSV Viewer").launch()
|