Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ emotions = {
|
|
62 |
'sadness': {'percentage': 10, 'motivation': 'negative', 'intensity': 0},
|
63 |
'grief': {'percentage': 10, 'motivation': 'negative', 'intensity': 0},
|
64 |
'anger': {'percentage': 10, 'motivation': 'traumatic or strong', 'intensity': 0},
|
65 |
-
'calmness': {'percentage': 10, 'motivation': 'neutral', 'intensity': 0},
|
66 |
'determination': {'percentage': 10, 'motivation': 'positive', 'intensity': 0},
|
67 |
'resentment': {'percentage': 10, 'motivation': 'negative', 'intensity': 0},
|
68 |
'glory': {'percentage': 10, 'motivation': 'positive', 'intensity': 0},
|
@@ -127,7 +127,7 @@ def evolve_emotions():
|
|
127 |
(toolbox.attr_float,) * (len(emotions) - 1) +
|
128 |
(toolbox.attr_intensity,) * len(emotions) +
|
129 |
(lambda: 100,), n=1)
|
130 |
-
|
131 |
toolbox.register("mutate", tools.mutGaussian, mu=0, sigma=1, indpb=0.2)
|
132 |
toolbox.register("select", tools.selNSGA2)
|
133 |
toolbox.register("evaluate", evaluate)
|
@@ -216,4 +216,4 @@ iface = gr.Interface(
|
|
216 |
)
|
217 |
|
218 |
if __name__ == "__main__":
|
219 |
-
iface.launch()
|
|
|
62 |
'sadness': {'percentage': 10, 'motivation': 'negative', 'intensity': 0},
|
63 |
'grief': {'percentage': 10, 'motivation': 'negative', 'intensity': 0},
|
64 |
'anger': {'percentage': 10, 'motivation': 'traumatic or strong', 'intensity': 0},
|
65 |
+
'calmness': {'percentage': 10, 'motivation': 'neutral', 'intensity': 0},
|
66 |
'determination': {'percentage': 10, 'motivation': 'positive', 'intensity': 0},
|
67 |
'resentment': {'percentage': 10, 'motivation': 'negative', 'intensity': 0},
|
68 |
'glory': {'percentage': 10, 'motivation': 'positive', 'intensity': 0},
|
|
|
127 |
(toolbox.attr_float,) * (len(emotions) - 1) +
|
128 |
(toolbox.attr_intensity,) * len(emotions) +
|
129 |
(lambda: 100,), n=1)
|
130 |
+
toolbox.register("mate", tools.cxTwoPoint)
|
131 |
toolbox.register("mutate", tools.mutGaussian, mu=0, sigma=1, indpb=0.2)
|
132 |
toolbox.register("select", tools.selNSGA2)
|
133 |
toolbox.register("evaluate", evaluate)
|
|
|
216 |
)
|
217 |
|
218 |
if __name__ == "__main__":
|
219 |
+
iface.launch()
|