rajsinghparihar
commited on
Commit
•
2b898ff
1
Parent(s):
28f535f
update app.py error handling
Browse files
app.py
CHANGED
@@ -29,7 +29,10 @@ def initialize(api_key, model_name):
|
|
29 |
return gr.update(choices=[])
|
30 |
|
31 |
if not service_context_module or current_model != model_name:
|
32 |
-
|
|
|
|
|
|
|
33 |
current_model = model_name
|
34 |
gr.Info("App started")
|
35 |
set_global_service_context(
|
|
|
29 |
return gr.update(choices=[])
|
30 |
|
31 |
if not service_context_module or current_model != model_name:
|
32 |
+
try:
|
33 |
+
service_context_module = ServiceContextModule(api_key, model_name)
|
34 |
+
except Exception as e:
|
35 |
+
print(e)
|
36 |
current_model = model_name
|
37 |
gr.Info("App started")
|
38 |
set_global_service_context(
|