Spaces:
Sleeping
Sleeping
max 30s
Browse files
app.py
CHANGED
|
@@ -90,7 +90,7 @@ def load_model():
|
|
| 90 |
except Exception as e:
|
| 91 |
return f"❌ Error loading model: {str(e)}"
|
| 92 |
|
| 93 |
-
@
|
| 94 |
def chat_predict(message, history, max_length, temperature, top_p, repetition_penalty, system_prompt):
|
| 95 |
"""Generate text using the loaded model with streaming and history"""
|
| 96 |
global model, tokenizer
|
|
|
|
| 90 |
except Exception as e:
|
| 91 |
return f"❌ Error loading model: {str(e)}"
|
| 92 |
|
| 93 |
+
@spaces.GPU(duration=30)
|
| 94 |
def chat_predict(message, history, max_length, temperature, top_p, repetition_penalty, system_prompt):
|
| 95 |
"""Generate text using the loaded model with streaming and history"""
|
| 96 |
global model, tokenizer
|