Sephfox commited on
Commit
34771b3
·
verified ·
1 Parent(s): 3b46644

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -147,7 +147,7 @@ def evolve_emotions():
147
 
148
  best_individual = tools.selBest(population, k=1)[0]
149
  emotion_values = best_individual[:len(emotions)]
150
- intensities = best_individual[len(emotions):]
151
 
152
  for i, (emotion, data) in enumerate(emotions.items()):
153
  data['percentage'] = emotion_values[i]
@@ -313,7 +313,8 @@ def visualize_emotions():
313
 
314
  # Create the Gradio interface
315
  iface = gr.Interface(
316
- fn=interactive_interface,inputs=gr.Textbox(label="Input Text"),
 
317
  outputs=[
318
  gr.Textbox(label="Predicted Emotion"),
319
  gr.Textbox(label="Sentiment Scores"),
@@ -329,4 +330,4 @@ iface = gr.Interface(
329
  description="An AI assistant that can analyze the emotional content of text and generate responses based on its emotional state.",
330
  )
331
 
332
- iface.launch()
 
147
 
148
  best_individual = tools.selBest(population, k=1)[0]
149
  emotion_values = best_individual[:len(emotions)]
150
+ intensities = best_individual[len(emotions):]
151
 
152
  for i, (emotion, data) in enumerate(emotions.items()):
153
  data['percentage'] = emotion_values[i]
 
313
 
314
  # Create the Gradio interface
315
  iface = gr.Interface(
316
+ fn=interactive_interface,
317
+ inputs=gr.Textbox(label="Input Text"),
318
  outputs=[
319
  gr.Textbox(label="Predicted Emotion"),
320
  gr.Textbox(label="Sentiment Scores"),
 
330
  description="An AI assistant that can analyze the emotional content of text and generate responses based on its emotional state.",
331
  )
332
 
333
+ iface.launch()