Spaces:
Running
on
Zero
Running
on
Zero
resolve UI issue
Browse files
app.py
CHANGED
@@ -46,9 +46,9 @@ with gr.Blocks() as nps:
|
|
46 |
return category_boxes
|
47 |
|
48 |
category_boxes = [] # Store category input boxes
|
49 |
-
category_column = gr.
|
50 |
add_category_btn = gr.Button("Add Category")
|
51 |
-
add_category_btn.click(fn=add_category, outputs=
|
52 |
uploaded_file = gr.File(label="Upload CSV", type="filepath")
|
53 |
template_btn = gr.Button("Use Template")
|
54 |
gr.Markdown("# NPS Comment Categorization")
|
@@ -75,7 +75,7 @@ with gr.Blocks() as nps:
|
|
75 |
|
76 |
uploaded_file.change(fn=load_data, inputs=uploaded_file, outputs=output)
|
77 |
template_btn.click(fn=lambda: "Using Template Dataset", outputs=output)
|
78 |
-
template_btn.click(fn=lambda: [
|
79 |
classify_btn.click(fn=classify_comments, inputs=category_boxes, outputs=output)
|
80 |
|
81 |
nps.launch()
|
|
|
46 |
return category_boxes
|
47 |
|
48 |
category_boxes = [] # Store category input boxes
|
49 |
+
category_column = gr.Row()
|
50 |
add_category_btn = gr.Button("Add Category")
|
51 |
+
add_category_btn.click(fn=add_category, outputs=category_boxes)
|
52 |
uploaded_file = gr.File(label="Upload CSV", type="filepath")
|
53 |
template_btn = gr.Button("Use Template")
|
54 |
gr.Markdown("# NPS Comment Categorization")
|
|
|
75 |
|
76 |
uploaded_file.change(fn=load_data, inputs=uploaded_file, outputs=output)
|
77 |
template_btn.click(fn=lambda: "Using Template Dataset", outputs=output)
|
78 |
+
template_btn.click(fn=lambda: ["Product Experience", "Customer Support", "Price of Service", "Other"], outputs=category_boxes)
|
79 |
classify_btn.click(fn=classify_comments, inputs=category_boxes, outputs=output)
|
80 |
|
81 |
nps.launch()
|