Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -106,9 +106,6 @@ def update_emotion(emotion, percentage, intensity):
|
|
106 |
for e in emotions:
|
107 |
emotions[e]['percentage'] = (emotions[e]['percentage'] / total) * 100
|
108 |
|
109 |
-
def normalize_context(context):
|
110 |
-
return context.lower().strip()
|
111 |
-
|
112 |
creator.create("FitnessMulti", base.Fitness, weights=(-1.0, -0.5, -0.2))
|
113 |
creator.create("Individual", list, fitness=creator.FitnessMulti)
|
114 |
|
@@ -304,7 +301,7 @@ def visualize_emotions():
|
|
304 |
plt.xticks(rotation=90)
|
305 |
plt.savefig('emotion_intensities.png')
|
306 |
|
307 |
-
|
308 |
|
309 |
# Create the Gradio interface
|
310 |
iface = gr.Interface(
|
|
|
106 |
for e in emotions:
|
107 |
emotions[e]['percentage'] = (emotions[e]['percentage'] / total) * 100
|
108 |
|
|
|
|
|
|
|
109 |
creator.create("FitnessMulti", base.Fitness, weights=(-1.0, -0.5, -0.2))
|
110 |
creator.create("Individual", list, fitness=creator.FitnessMulti)
|
111 |
|
|
|
301 |
plt.xticks(rotation=90)
|
302 |
plt.savefig('emotion_intensities.png')
|
303 |
|
304 |
+
return 'emotion_percentages.png', 'emotion_intensities.png'
|
305 |
|
306 |
# Create the Gradio interface
|
307 |
iface = gr.Interface(
|