Sephfox commited on
Commit
d3eaecf
·
verified ·
1 Parent(s): 7c1e4e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -145,7 +145,8 @@ def evolve_emotions():
145
  best_individual = tools.selBest(population, k=1)[0]
146
  emotion_values = best_individual[:len(emotions)]
147
  intensities = best_individual[len(emotions):]
148
- def predict_emotion(context):
 
149
  load_models()
150
  inputs = emotion_prediction_tokenizer(context, return_tensors="pt", truncation=True, max_length=512)
151
  with torch.no_grad():
@@ -288,4 +289,4 @@ iface = gr.Interface(fn=interactive_interface, inputs="text", outputs=[
288
  ], title="Emotion-Aware AI Assistant")
289
 
290
  # Launch the interface
291
- iface.launch()
 
145
  best_individual = tools.selBest(population, k=1)[0]
146
  emotion_values = best_individual[:len(emotions)]
147
  intensities = best_individual[len(emotions):]
148
+
149
+ def predict_emotion(context):
150
  load_models()
151
  inputs = emotion_prediction_tokenizer(context, return_tensors="pt", truncation=True, max_length=512)
152
  with torch.no_grad():
 
289
  ], title="Emotion-Aware AI Assistant")
290
 
291
  # Launch the interface
292
+ iface.launch()