YuryS commited on
Commit
ad85938
·
1 Parent(s): 9d99d8b

Proper error message

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -41,7 +41,11 @@ def respond(
41
  message,
42
  history: list[tuple[str, str]]
43
  ):
44
- _init()
 
 
 
 
45
 
46
  messages = []
47
 
 
41
  message,
42
  history: list[tuple[str, str]]
43
  ):
44
+ try:
45
+ _init()
46
+ except Exception as e:
47
+ print(f"Error initializing model: {e}")
48
+ yield f"Error initializing model: {e}"
49
 
50
  messages = []
51