thesven commited on
Commit
04e30d7
1 Parent(s): b9570bd

gpu zero is tricky

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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