Spaces:
Sleeping
Sleeping
| from datasets import load_dataset | |
| import gradio as gr | |
| def preview_data(): | |
| dataset = load_dataset( | |
| "json", | |
| data_files="https://huggingface.co/gfather/publications/resolve/main/publication_1.json" | |
| ) | |
| df = dataset["train"].to_pandas() | |
| return df.head().to_string() | |
| iface = gr.Interface(fn=preview_data, inputs=None, outputs="text", title="Dataset Preview") | |
| iface.launch() |