Anjo123 commited on
Commit
1cffa06
·
verified ·
1 Parent(s): 5c23eca

Fixed conversation state error

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -106,6 +106,8 @@ with gr.Blocks(theme = theme, css = custom_css) as demo:
106
 
107
  custom_country_input = gr.Textbox(label="Enter Country (if not listed)", visible=False)
108
 
 
 
109
  chatbot = gr.Chatbot(label="💬 Chat History", type="messages")
110
  chatbot.clear(fn=clear_history, outputs=conversation_state)
111
 
@@ -149,8 +151,6 @@ with gr.Blocks(theme = theme, css = custom_css) as demo:
149
 
150
  country_input.change(lambda c: gr.update(visible=c == "Other"), inputs=country_input, outputs=custom_country_input)
151
 
152
- conversation_state = gr.State([])
153
-
154
  submit_btn.click(
155
  submit,
156
  inputs=[country_input, custom_country_input, language_input, scenario_input, conversation_state],
 
106
 
107
  custom_country_input = gr.Textbox(label="Enter Country (if not listed)", visible=False)
108
 
109
+ conversation_state = gr.State([])
110
+
111
  chatbot = gr.Chatbot(label="💬 Chat History", type="messages")
112
  chatbot.clear(fn=clear_history, outputs=conversation_state)
113
 
 
151
 
152
  country_input.change(lambda c: gr.update(visible=c == "Other"), inputs=country_input, outputs=custom_country_input)
153
 
 
 
154
  submit_btn.click(
155
  submit,
156
  inputs=[country_input, custom_country_input, language_input, scenario_input, conversation_state],