Spaces:
Sleeping
Sleeping
add default value for endpoint
Browse files
app.py
CHANGED
@@ -12,6 +12,7 @@ QUEUE_MAX_SIZE = int(os.getenv("QUEUE_MAX_SIZE", 20))
|
|
12 |
QUEUE_CONCURENCY_COUNT = int(os.getenv("QUEUE_CONCURENCY_COUNT", 10))
|
13 |
USERNAME = os.getenv("USERNAME")
|
14 |
PASSWORD = os.getenv("PASSWORD")
|
|
|
15 |
|
16 |
|
17 |
class LearningBotRequest(BaseModel):
|
@@ -83,7 +84,7 @@ with gr.Blocks() as demo:
|
|
83 |
with gr.Column(scale=5):
|
84 |
clear = gr.Button("Clear all converstation")
|
85 |
with gr.Column(scale=5):
|
86 |
-
endpoint = gr.Textbox(label="Endpoint API")
|
87 |
with gr.Accordion("Parameters", open=False):
|
88 |
user_serial = gr.Textbox(label="User serial")
|
89 |
context = gr.Textbox(label="context", value={})
|
|
|
12 |
QUEUE_CONCURENCY_COUNT = int(os.getenv("QUEUE_CONCURENCY_COUNT", 10))
|
13 |
USERNAME = os.getenv("USERNAME")
|
14 |
PASSWORD = os.getenv("PASSWORD")
|
15 |
+
CHATBOT_ENDPOINT = os.getenv("CHATBOT_ENDPOINT", "http://localhost:5000")
|
16 |
|
17 |
|
18 |
class LearningBotRequest(BaseModel):
|
|
|
84 |
with gr.Column(scale=5):
|
85 |
clear = gr.Button("Clear all converstation")
|
86 |
with gr.Column(scale=5):
|
87 |
+
endpoint = gr.Textbox(label="Endpoint API", value=CHATBOT_ENDPOINT)
|
88 |
with gr.Accordion("Parameters", open=False):
|
89 |
user_serial = gr.Textbox(label="User serial")
|
90 |
context = gr.Textbox(label="context", value={})
|