Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -146,7 +146,7 @@ def evolve_emotions():
|
|
146 |
emotion_values = best_individual[:len(emotions)]
|
147 |
intensities = best_individual[len(emotions):]
|
148 |
def predict_emotion(context):
|
149 |
-
|
150 |
inputs = emotion_prediction_tokenizer(context, return_tensors="pt", truncation=True, max_length=512)
|
151 |
with torch.no_grad():
|
152 |
outputs = emotion_prediction_model(**inputs)
|
|
|
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():
|
152 |
outputs = emotion_prediction_model(**inputs)
|