ragha108 commited on
Commit
755b136
·
1 Parent(s): 8d43460

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -139,16 +139,16 @@ block = gr.Blocks(theme=gr.themes.Monochrome(secondary_hue="neutral").set(button
139
 
140
  with block:
141
  # gr.Markdown("""<h1><center>_/\_ AI YOGI _/\_ </center></h1>""")
142
- chatbot = gr.Chatbot(label="Ai Yogi:")
143
- message = gr.Textbox(label="Namaste!",placeholder="Please type:"Help me find out my Dosha!")
144
  # message.change(fn=lambda value: gr.update(value=""))
145
  state = gr.State()
146
  submit = gr.Button("SEND")
147
  submit.click(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
148
  clear = gr.Button("CLEAR")
149
  clear.click(delete_chat_history, inputs=[state], outputs=[chatbot, state])
150
- clear.click(lambda x: gr.update(value='',placeholder="Please type:"Help me find out my Dosha!",label="Namaste!"), [],[message])
151
- submit.click(lambda x: gr.update(value='',placeholder="",label="Continue your conversation with Ai Yogi below"), [],[message])
152
  submit.click(lambda x: gr.update(label='Ai Yogi:'), [],[chatbot])
153
  clear.click(lambda x: gr.update(label='Ai Yogi:'), [],[chatbot])
154
 
 
139
 
140
  with block:
141
  # gr.Markdown("""<h1><center>_/\_ AI YOGI _/\_ </center></h1>""")
142
+ chatbot = gr.Chatbot(label='Ai Yogi:')
143
+ message = gr.Textbox(label='Namaste!',placeholder='Please type: Help me find out my Dosha!')
144
  # message.change(fn=lambda value: gr.update(value=""))
145
  state = gr.State()
146
  submit = gr.Button("SEND")
147
  submit.click(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
148
  clear = gr.Button("CLEAR")
149
  clear.click(delete_chat_history, inputs=[state], outputs=[chatbot, state])
150
+ clear.click(lambda x: gr.update(value='',placeholder='Please type: Help me find out my Dosha!',label='Namaste!'), [],[message])
151
+ submit.click(lambda x: gr.update(value='',placeholder='',label='Continue your conversation with Ai Yogi below'), [],[message])
152
  submit.click(lambda x: gr.update(label='Ai Yogi:'), [],[chatbot])
153
  clear.click(lambda x: gr.update(label='Ai Yogi:'), [],[chatbot])
154