Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ from assistants import (
|
|
30 |
|
31 |
def chat(message, history, openai_api_key):
|
32 |
if not openai_api_key:
|
33 |
-
raise gr.Error("OpenAI API Key is required.")
|
34 |
if not message:
|
35 |
raise gr.Error("Message is required.")
|
36 |
|
@@ -93,5 +93,5 @@ gr.ChatInterface(
|
|
93 |
cache_examples=False,
|
94 |
additional_inputs=[
|
95 |
gr.Textbox("", label="OpenAI API Key")
|
96 |
-
|
97 |
).launch()
|
|
|
30 |
|
31 |
def chat(message, history, openai_api_key):
|
32 |
if not openai_api_key:
|
33 |
+
raise gr.Error("OpenAI API Key is required (see additional inputs below).")
|
34 |
if not message:
|
35 |
raise gr.Error("Message is required.")
|
36 |
|
|
|
93 |
cache_examples=False,
|
94 |
additional_inputs=[
|
95 |
gr.Textbox("", label="OpenAI API Key")
|
96 |
+
],
|
97 |
).launch()
|