Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -98,15 +98,25 @@ with gr.Blocks() as nps:
|
|
| 98 |
""")
|
| 99 |
|
| 100 |
# Template button
|
| 101 |
-
template_btn = gr.Button("Use Template")
|
| 102 |
|
| 103 |
-
# Category
|
| 104 |
with gr.Row():
|
| 105 |
-
with gr.Column():
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
| 109 |
category_status = gr.Markdown("**Categories:**\n- None")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
# Classify button
|
| 112 |
classify_btn = gr.Button("Classify", size="sm")
|
|
|
|
| 98 |
""")
|
| 99 |
|
| 100 |
# Template button
|
| 101 |
+
template_btn = gr.Button("Use Template", size="sm")
|
| 102 |
|
| 103 |
+
# Category section
|
| 104 |
with gr.Row():
|
| 105 |
+
with gr.Column(scale=1):
|
| 106 |
+
# Category input and buttons
|
| 107 |
+
category_input = gr.Textbox(label="New Category", placeholder="Enter category name", scale=1)
|
| 108 |
+
with gr.Row():
|
| 109 |
+
add_category_btn = gr.Button("Add Category", size="sm")
|
| 110 |
+
reset_btn = gr.Button("Reset Categories", size="sm")
|
| 111 |
+
# Category display
|
| 112 |
category_status = gr.Markdown("**Categories:**\n- None")
|
| 113 |
+
with gr.Column(scale=2):
|
| 114 |
+
gr.Markdown("""
|
| 115 |
+
**Instructions:**
|
| 116 |
+
- Enter a category name and click **Add Category** to add it to the list.
|
| 117 |
+
- Click **Reset Categories** to clear the list.
|
| 118 |
+
- The `customer_comment` field will be categorized based on the categories you provide.
|
| 119 |
+
""")
|
| 120 |
|
| 121 |
# Classify button
|
| 122 |
classify_btn = gr.Button("Classify", size="sm")
|