abidlabs HF staff commited on
Commit
9486835
1 Parent(s): f8a48a1

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ with gr.Blocks() as demo:
4
+ gr.Markdown("# Train a Text Classifier with Synthetic Data")
5
+ labels = gr.Dropdown(choices=[], value=[], label="Classes", allow_custom_value=True, multiselect=True)
6
+
7
+ @gr.render(inputs=[labels])
8
+ def show_textbox(labels_):
9
+ with gr.Row():
10
+ for label in labels_:
11
+ gr.TextArea(label=f"Samples for class: {label}")
12
+ if len(labels_)>=2:
13
+ with gr.Row():
14
+ gr.Button("TRAIN!", variant="primary")
15
+
16
+ demo.launch()