Commit
·
6f7e3e7
1
Parent(s):
dd10ecd
Update app
Browse files
app.py
CHANGED
@@ -83,6 +83,14 @@ def refusal_condition(query):
|
|
83 |
return False
|
84 |
|
85 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
gr.Markdown(DESCRIPTION)
|
87 |
|
88 |
system_prompt = gr.Textbox(label='System prompt',
|
|
|
83 |
return False
|
84 |
|
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 |
|
96 |
system_prompt = gr.Textbox(label='System prompt',
|