ArmelR commited on
Commit
f1f1826
1 Parent(s): ccf4e6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -217,8 +217,8 @@ def generate(
217
 
218
  return chat, history, user_message, ""
219
  except UnknownError :
220
- print("The model is currently loading. Please wait a few seconds and retry.")
221
- #return "The model is currently loading. Please wait a few seconds and retry.", None, None, ""
222
 
223
  examples = [
224
  "Use the gradio library to create a calculator. It should take into account the 4 basic operations. A user should be able to enter 2 numbers, choose an operation and get the corresponding result.",
 
217
 
218
  return chat, history, user_message, ""
219
  except UnknownError :
220
+ error_message = "The model is currently loading. Please wait a few seconds and retry."
221
+ return [(user_message, error_message)], history, user_message, ""
222
 
223
  examples = [
224
  "Use the gradio library to create a calculator. It should take into account the 4 basic operations. A user should be able to enter 2 numbers, choose an operation and get the corresponding result.",