Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -52,17 +52,17 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
52 |
ret=response.json()
|
53 |
return ret['result']
|
54 |
|
55 |
-
def respond(message, chat_history
|
56 |
-
print("params",url_params)
|
57 |
bot_message=call_api(message,12,"xyz")
|
58 |
chat_history.append((message, bot_message))
|
59 |
return "", chat_history
|
60 |
|
61 |
chatbot = gr.Chatbot(label='Jivi')
|
62 |
msg = gr.Textbox(label='Patient')
|
63 |
-
url_params = gr.JSON({}, visible=False, label="URL Params")
|
64 |
clear = gr.ClearButton([msg, chatbot])
|
65 |
-
msg.submit(respond, [msg, chatbot
|
66 |
|
67 |
|
68 |
demo.launch(auth=(os.environ.get("USER","demo"), os.environ.get("PASSWORD","demo")))
|
|
|
52 |
ret=response.json()
|
53 |
return ret['result']
|
54 |
|
55 |
+
def respond(message, chat_history):
|
56 |
+
#print("params",url_params)
|
57 |
bot_message=call_api(message,12,"xyz")
|
58 |
chat_history.append((message, bot_message))
|
59 |
return "", chat_history
|
60 |
|
61 |
chatbot = gr.Chatbot(label='Jivi')
|
62 |
msg = gr.Textbox(label='Patient')
|
63 |
+
#url_params = gr.JSON({}, visible=False, label="URL Params")
|
64 |
clear = gr.ClearButton([msg, chatbot])
|
65 |
+
msg.submit(respond, [msg, chatbot], [msg, chatbot])
|
66 |
|
67 |
|
68 |
demo.launch(auth=(os.environ.get("USER","demo"), os.environ.get("PASSWORD","demo")))
|