NCTCMumbai
commited on
Commit
•
af75e7b
1
Parent(s):
8511da7
Update app.py
Browse files
app.py
CHANGED
@@ -106,7 +106,7 @@ def bot(history, api_kind):
|
|
106 |
for character in generate_fn(prompt, history[:-1]):
|
107 |
history[-1][1] = character
|
108 |
yield history, prompt_html
|
109 |
-
|
110 |
yield f"An unexpected error occurred during generation: {str(e)}"
|
111 |
|
112 |
with gr.Blocks() as demo:
|
|
|
106 |
for character in generate_fn(prompt, history[:-1]):
|
107 |
history[-1][1] = character
|
108 |
yield history, prompt_html
|
109 |
+
except Exception as e: # Catch any exception
|
110 |
yield f"An unexpected error occurred during generation: {str(e)}"
|
111 |
|
112 |
with gr.Blocks() as demo:
|