bstraehle commited on
Commit
b12653c
1 Parent(s): 1c935f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- #try:
39
  #assistant = create_assistant()
40
- assistant = load_assistant()
41
- #except:
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:
 
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: