Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
with gr.Blocks() as demo:
|
2 |
+
gr.Markdown("# Dataset Filter and Push")
|
3 |
+
|
4 |
+
with gr.Row():
|
5 |
+
dataset_name_input = gr.Textbox(label="Source Dataset Name (e.g., declare-lab/audio-alpaca)", value="declare-lab/audio-alpaca")
|
6 |
+
split_name_input = gr.Textbox(label="Split Name (e.g., train)", value="train")
|
7 |
+
|
8 |
+
keywords_input = gr.Textbox(label="Keywords (comma-separated, e.g., dog, cat, bird)", value="dog, cat, bird")
|
9 |
+
|
10 |
+
with gr.Row():
|
11 |
+
new_dataset_repo_id_input = gr.Textbox(label="New Dataset Repo ID (e.g., your_username/your_dataset)")
|
12 |
+
hf_token_input = gr.Textbox(label="Hugging Face Token", type="password")
|
13 |
+
|
14 |
+
submit_button = gr.Button("Filter and Push")
|
15 |
+
|
16 |
+
with gr.Row():
|
17 |
+
output_text = gr.Textbox(label="Status")
|
18 |
+
dataset_output_link = gr.Textbox(label="Dataset URL")
|
19 |
+
|
20 |
+
|
21 |
+
submit_button.click(
|
22 |
+
filter_and_push,
|
23 |
+
inputs=[dataset_name_input, split_name_input, keywords_input, new_dataset_repo_id_input, hf_token_input],
|
24 |
+
outputs=[output_text, dataset_output_link],
|
25 |
+
)
|