Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -35,11 +35,11 @@ def chat(message, history):
|
|
35 |
# see https://platform.openai.com/playground/assistants.
|
36 |
# On subsequent runs, load assistant.
|
37 |
if assistant == None:
|
38 |
-
|
39 |
#assistant = create_assistant()
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
|
44 |
# TODO: Use Gradio session to support multiple users
|
45 |
if thread == None or len(history) == 0:
|
|
|
35 |
# see https://platform.openai.com/playground/assistants.
|
36 |
# On subsequent runs, load assistant.
|
37 |
if assistant == None:
|
38 |
+
try:
|
39 |
#assistant = create_assistant()
|
40 |
+
assistant = load_assistant()
|
41 |
+
except AuthenticationError:
|
42 |
+
raise gr.Error("Please clone and bring your own credentials.")
|
43 |
|
44 |
# TODO: Use Gradio session to support multiple users
|
45 |
if thread == None or len(history) == 0:
|