Spaces:
Runtime error
Runtime error
gpu zero is tricky
Browse files
app.py
CHANGED
@@ -34,6 +34,9 @@ def start():
|
|
34 |
|
35 |
def send_message(message, history):
|
36 |
global tokenizer, model
|
|
|
|
|
|
|
37 |
# Add the user's message to the history
|
38 |
history.append(("User", message))
|
39 |
|
|
|
34 |
|
35 |
def send_message(message, history):
|
36 |
global tokenizer, model
|
37 |
+
if tokenizer is None or model is None:
|
38 |
+
start() # Ensure the model and tokenizer are initialized
|
39 |
+
|
40 |
# Add the user's message to the history
|
41 |
history.append(("User", message))
|
42 |
|