Thanh-Lam commited on
Commit
3799c1c
·
1 Parent(s): 4b131eb

Remove all emoji/icons from UI

Browse files
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -108,10 +108,10 @@ class MultiModelProfiler:
108
  if self.current_model is None:
109
  self.current_model = model_name
110
 
111
- print(f"{model_name} loaded successfully")
112
 
113
  except Exception as e:
114
- print(f"Error loading {model_name}: {e}")
115
  import traceback
116
  traceback.print_exc()
117
 
@@ -215,14 +215,13 @@ def create_interface():
215
  # Create model info text
216
  model_info = ""
217
  for name, config in MODELS_CONFIG.items():
218
- status = "" if name in profiler.models else ""
219
  model_info += f"{status} **{name}**: {config['description']}\n"
220
 
221
- # Use gr.Blocks without theme for compatibility with older Gradio
222
  with gr.Blocks(title="Vietnamese Speaker Profiling") as demo:
223
  gr.Markdown(
224
  """
225
- # 🎙️ Vietnamese Speaker Profiling
226
 
227
  Analyze Vietnamese speech to predict **Gender** and **Dialect Region**.
228
 
@@ -232,7 +231,7 @@ def create_interface():
232
 
233
  with gr.Row():
234
  with gr.Column(scale=1):
235
- gr.Markdown("### 📤 Input")
236
  audio_input = gr.Audio(
237
  label="Upload or Record Audio",
238
  type="filepath",
@@ -242,25 +241,25 @@ def create_interface():
242
  model_dropdown = gr.Dropdown(
243
  choices=available_models,
244
  value=available_models[0] if available_models else None,
245
- label="🤖 Select Model",
246
  info="Choose the AI model for analysis"
247
  )
248
 
249
- submit_btn = gr.Button("🔍 Analyze", variant="primary", size="lg")
250
 
251
- gr.Markdown("### ℹ️ Available Models")
252
  gr.Markdown(model_info)
253
 
254
  with gr.Column(scale=1):
255
- gr.Markdown("### 📊 Results")
256
- gender_output = gr.Textbox(label="👤 Gender", interactive=False)
257
- dialect_output = gr.Textbox(label="🗣️ Dialect Region", interactive=False)
258
 
259
  gr.Markdown(
260
  """
261
- ### 📖 Dialect Regions
262
  - **Northern**: Hanoi and surrounding areas
263
- - **Central**: Huế, Đà Nẵng, and Central Vietnam
264
  - **Southern**: Ho Chi Minh City and Southern Vietnam
265
  """
266
  )
@@ -274,7 +273,7 @@ def create_interface():
274
  gr.Markdown(
275
  """
276
  ---
277
- *Made with ❤️ for Vietnamese Speech Processing Research*
278
  """
279
  )
280
 
 
108
  if self.current_model is None:
109
  self.current_model = model_name
110
 
111
+ print(f"{model_name} loaded successfully")
112
 
113
  except Exception as e:
114
+ print(f"Error loading {model_name}: {e}")
115
  import traceback
116
  traceback.print_exc()
117
 
 
215
  # Create model info text
216
  model_info = ""
217
  for name, config in MODELS_CONFIG.items():
218
+ status = "[OK]" if name in profiler.models else "[X]"
219
  model_info += f"{status} **{name}**: {config['description']}\n"
220
 
 
221
  with gr.Blocks(title="Vietnamese Speaker Profiling") as demo:
222
  gr.Markdown(
223
  """
224
+ # Vietnamese Speaker Profiling
225
 
226
  Analyze Vietnamese speech to predict **Gender** and **Dialect Region**.
227
 
 
231
 
232
  with gr.Row():
233
  with gr.Column(scale=1):
234
+ gr.Markdown("### Input")
235
  audio_input = gr.Audio(
236
  label="Upload or Record Audio",
237
  type="filepath",
 
241
  model_dropdown = gr.Dropdown(
242
  choices=available_models,
243
  value=available_models[0] if available_models else None,
244
+ label="Select Model",
245
  info="Choose the AI model for analysis"
246
  )
247
 
248
+ submit_btn = gr.Button("Analyze", variant="primary", size="lg")
249
 
250
+ gr.Markdown("### Available Models")
251
  gr.Markdown(model_info)
252
 
253
  with gr.Column(scale=1):
254
+ gr.Markdown("### Results")
255
+ gender_output = gr.Textbox(label="Gender", interactive=False)
256
+ dialect_output = gr.Textbox(label="Dialect Region", interactive=False)
257
 
258
  gr.Markdown(
259
  """
260
+ ### Dialect Regions
261
  - **Northern**: Hanoi and surrounding areas
262
+ - **Central**: Hue, Da Nang, and Central Vietnam
263
  - **Southern**: Ho Chi Minh City and Southern Vietnam
264
  """
265
  )
 
273
  gr.Markdown(
274
  """
275
  ---
276
+ *Vietnamese Speech Processing Research*
277
  """
278
  )
279