Spaces:
Running
Running
| import gradio as gr | |
| import pandas as pd | |
| # Load the CSV data into a pandas DataFrame | |
| df = pd.read_csv( | |
| "https://raw.githubusercontent.com/autogluon/fev/refs/heads/main/benchmarks/chronos_zeroshot/results/seasonal_naive.csv" | |
| ) | |
| # Define a function that returns the DataFrame | |
| def show_data(): | |
| return df | |
| # Create a Gradio interface | |
| # Setting outputs to "dataframe" automatically provides a DataFrame display. | |
| # Alternatively, you can specify outputs=gr.DataFrame() for more configuration. | |
| interface = gr.Interface( | |
| fn=show_data, | |
| inputs=[], | |
| outputs="dataframe", | |
| title="CSV Data Viewer", | |
| description="This application displays the contents of a CSV file as a pandas DataFrame.", | |
| ) | |
| if __name__ == "__main__": | |
| interface.launch() | |