Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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=
|
143 |
-
message = gr.Textbox(label=
|
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=
|
151 |
-
submit.click(lambda x: gr.update(value='',placeholder=
|
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 |
|