ragha108 commited on
Commit
eaf11d4
·
1 Parent(s): 8cf316b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -141,15 +141,15 @@ block = gr.Blocks(theme=gr.themes.Monochrome(secondary_hue="neutral").set(button
141
  with block:
142
  # gr.Markdown("""<h1><center>_/\_ AI YOGI _/\_ </center></h1>""")
143
  chatbot = gr.Chatbot(label='Ai Yogi:')
144
- message = gr.Textbox(label='Namaste! Please introduce yourself below and then hit SEND',placeholder='')
145
  # message.change(fn=lambda value: gr.update(value=""))
146
  state = gr.State()
147
  submit = gr.Button("SEND")
148
  submit.click(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
149
  clear = gr.Button("CLEAR")
150
  clear.click(delete_chat_history, inputs=[state], outputs=[chatbot, state])
151
- clear.click(lambda x: gr.update(value='',placeholder='',label='Namaste! Please introduce yourself below and then hit SEND'), [],[message])
152
- submit.click(lambda x: gr.update(value='',placeholder='',label='Please answer below and then hit SEND'), [],[message])
153
  submit.click(lambda x: gr.update(label='Ai Yogi:'), [],[chatbot])
154
  clear.click(lambda x: gr.update(label='Ai Yogi:'), [],[chatbot])
155
 
 
141
  with block:
142
  # gr.Markdown("""<h1><center>_/\_ AI YOGI _/\_ </center></h1>""")
143
  chatbot = gr.Chatbot(label='Ai Yogi:')
144
+ message = gr.Textbox(label='Namaste! Please introduce yourself below and then click SEND',placeholder='')
145
  # message.change(fn=lambda value: gr.update(value=""))
146
  state = gr.State()
147
  submit = gr.Button("SEND")
148
  submit.click(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
149
  clear = gr.Button("CLEAR")
150
  clear.click(delete_chat_history, inputs=[state], outputs=[chatbot, state])
151
+ clear.click(lambda x: gr.update(value='',placeholder='',label='Namaste! Please introduce yourself below and then click SEND'), [],[message])
152
+ submit.click(lambda x: gr.update(value='',placeholder='',label='Please answer below and then click SEND'), [],[message])
153
  submit.click(lambda x: gr.update(label='Ai Yogi:'), [],[chatbot])
154
  clear.click(lambda x: gr.update(label='Ai Yogi:'), [],[chatbot])
155