MarkChen1214 commited on
Commit
b7666f5
1 Parent(s): 3006c26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -85,11 +85,11 @@ def refusal_condition(query):
85
  with gr.Blocks() as demo:
86
  # Check if the API_URL and TOKEN are set
87
  if API_URL is None:
88
- gr.Error("API_URL is not set as an environment variable.")
89
  if TOKEN is None:
90
- gr.Error("TOKEN is not set as an environment variable.")
91
  if MODEL_NAME is None:
92
- gr.Error("MODEL_NAME is not set as an environment variable.")
93
 
94
  gr.Markdown(DESCRIPTION)
95
 
 
85
  with gr.Blocks() as demo:
86
  # Check if the API_URL and TOKEN are set
87
  if API_URL is None:
88
+ raise gr.Error("API_URL is not set as an environment variable.")
89
  if TOKEN is None:
90
+ raise gr.Error("TOKEN is not set as an environment variable.")
91
  if MODEL_NAME is None:
92
+ raise gr.Error("MODEL_NAME is not set as an environment variable.")
93
 
94
  gr.Markdown(DESCRIPTION)
95