Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from datasets import load_dataset
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
def preview_data():
|
| 5 |
+
dataset = load_dataset("gfather/publications")
|
| 6 |
+
df = dataset["train"].to_pandas()
|
| 7 |
+
return df.head().to_string()
|
| 8 |
+
|
| 9 |
+
iface = gr.Interface(fn=preview_data, inputs=None, outputs="text", title="Dataset Preview")
|
| 10 |
+
iface.launch()
|