Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def generate_text(prompt, history, user_id):
|
|
| 42 |
if not user_data.get("subscribed", False):
|
| 43 |
if user_data["message_count"] <= 0:
|
| 44 |
return history + [[prompt, "Has alcanzado el límite de mensajes gratuitos. Suscríbete para continuar."]]
|
| 45 |
-
user_ref.update({"message_count": user_data["message_count"] - 1
|
| 46 |
|
| 47 |
response = generator(prompt, max_length=100, temperature=0.7, top_k=50, top_p=0.9)[0]['generated_text']
|
| 48 |
history.append([prompt, response])
|
|
|
|
| 42 |
if not user_data.get("subscribed", False):
|
| 43 |
if user_data["message_count"] <= 0:
|
| 44 |
return history + [[prompt, "Has alcanzado el límite de mensajes gratuitos. Suscríbete para continuar."]]
|
| 45 |
+
user_ref.update({"message_count": user_data["message_count"] - 1})
|
| 46 |
|
| 47 |
response = generator(prompt, max_length=100, temperature=0.7, top_k=50, top_p=0.9)[0]['generated_text']
|
| 48 |
history.append([prompt, response])
|