skumar9 commited on
Commit
37db8f0
1 Parent(s): 374f7fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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,url_params):
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,url_params], [msg, chatbot],_js=get_window_url_params)
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")))