ZennyKenny commited on
Commit
e1ba125
Β·
verified Β·
1 Parent(s): f46e8ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -77,7 +77,7 @@ with gr.Blocks() as nps:
77
  categories = gr.State([])
78
 
79
  # App title
80
- gr.Markdown("# Customer Comment Classifier")
81
 
82
  # Short explanation
83
  gr.Markdown("""
@@ -89,14 +89,14 @@ with gr.Blocks() as nps:
89
  # File upload and instructions
90
  with gr.Row():
91
  with gr.Column(scale=1):
92
- uploaded_file = gr.File(label="Upload CSV", type="filepath", scale=1)
93
  with gr.Column(scale=1):
94
  gr.Markdown("""
95
- **Instructions:**
96
  - Upload a CSV file with at least one column: `customer_comment`.
97
  - If you don't have your own data, click **Use Template** to load a sample dataset.
98
  """)
99
- template_btn = gr.Button("Use Template", size="sm")
100
 
101
  gr.Markdown("---")
102
 
@@ -104,15 +104,15 @@ with gr.Blocks() as nps:
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=1):
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.
@@ -123,7 +123,7 @@ with gr.Blocks() as nps:
123
  # Classify button and output
124
  with gr.Row():
125
  with gr.Column(scale=1):
126
- classify_btn = gr.Button("Classify", size="sm")
127
  with gr.Column(scale=3): # Center the container and make it 75% of the window width
128
  output = gr.HTML()
129
 
 
77
  categories = gr.State([])
78
 
79
  # App title
80
+ gr.Markdown("# πŸŽ‰ Customer Comment Classifier πŸŽ‰")
81
 
82
  # Short explanation
83
  gr.Markdown("""
 
89
  # File upload and instructions
90
  with gr.Row():
91
  with gr.Column(scale=1):
92
+ uploaded_file = gr.File(label="πŸ“‚ Upload CSV", type="filepath", scale=1)
93
  with gr.Column(scale=1):
94
  gr.Markdown("""
95
+ **πŸ“ Instructions:**
96
  - Upload a CSV file with at least one column: `customer_comment`.
97
  - If you don't have your own data, click **Use Template** to load a sample dataset.
98
  """)
99
+ template_btn = gr.Button("✨ Use Template", size="sm", variant="primary")
100
 
101
  gr.Markdown("---")
102
 
 
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", variant="primary")
110
+ reset_btn = gr.Button("πŸ”„ Reset Categories", size="sm", variant="secondary")
111
  # Category display
112
+ category_status = gr.Markdown("**πŸ“‚ Categories:**\n- None")
113
  with gr.Column(scale=1):
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.
 
123
  # Classify button and output
124
  with gr.Row():
125
  with gr.Column(scale=1):
126
+ classify_btn = gr.Button("πŸ” Classify", size="sm", variant="primary")
127
  with gr.Column(scale=3): # Center the container and make it 75% of the window width
128
  output = gr.HTML()
129