Spaces:
Runtime error
Runtime error
process csv
Browse files
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import pandas as pd
|
| 3 |
+
|
| 4 |
+
def load_csv(file):
|
| 5 |
+
df = pd.read_csv(file)
|
| 6 |
+
return df
|
| 7 |
+
|
| 8 |
+
iface = gr.Interface(
|
| 9 |
+
fn=load_csv,
|
| 10 |
+
inputs="file",
|
| 11 |
+
outputs="dataframe",
|
| 12 |
+
title="CSV Loader",
|
| 13 |
+
description="Load a CSV file and display its contents.",
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
iface.launch()
|