Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from gradio_huggingfacehub_search import HuggingfaceHubSearch
|
3 |
+
|
4 |
+
|
5 |
+
with gr.Blocks() as demo:
|
6 |
+
gr.Markdown("# 💫 Process parquet files 💫")
|
7 |
+
dataset_name = HuggingfaceHubSearch(
|
8 |
+
label="Hub Dataset ID",
|
9 |
+
placeholder="Search for dataset id on Huggingface",
|
10 |
+
search_type="dataset",
|
11 |
+
value="HuggingFaceFW/fineweb",
|
12 |
+
)
|
13 |
+
|
14 |
+
@gr.render(inputs=dataset_name)
|
15 |
+
def embed(name):
|
16 |
+
html_code = f"""
|
17 |
+
<iframe
|
18 |
+
src="https://huggingface.co/datasets/{name}/embed/viewer/default/train"
|
19 |
+
frameborder="0"
|
20 |
+
width="100%"
|
21 |
+
height="560px"
|
22 |
+
></iframe>
|
23 |
+
"""
|
24 |
+
return gr.HTML(value=html_code)
|
25 |
+
|
26 |
+
|
27 |
+
demo.launch()
|