Willder commited on
Commit
746a721
β€’
1 Parent(s): 05b1398

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -165,12 +165,7 @@ def init_chat(chat_name):
165
 
166
  with ask_form.form(chat_name):
167
  col1, col2 = st.columns([10, 1])
168
- question_widget = col1.empty()
169
- if not chat["question"]:
170
- input_text = question_widget.text_area("πŸ˜ƒ You: ", "Hello, how are you?", key="input", max_chars=2000,
171
- label_visibility='collapsed')
172
- else:
173
- input_text = question_widget.text_area("πŸ˜ƒ You: ", "", key="input", max_chars=2000,
174
  label_visibility='collapsed')
175
 
176
  submitted = col2.form_submit_button("πŸ›«")
@@ -187,9 +182,7 @@ def init_chat(chat_name):
187
  chat["question"].append(input_text)
188
  chat["answer"].append(answer)
189
 
190
- # clear input after ask
191
- #question_widget.text_area("πŸ˜ƒ You: ", "", key="input-1", max_chars=2000,
192
- # label_visibility='collapsed')
193
 
194
 
195
  def init_css():
 
165
 
166
  with ask_form.form(chat_name):
167
  col1, col2 = st.columns([10, 1])
168
+ input_text = col1.text_area("πŸ˜ƒ You: ", "Hello, how are you?", key="input", max_chars=2000,
 
 
 
 
 
169
  label_visibility='collapsed')
170
 
171
  submitted = col2.form_submit_button("πŸ›«")
 
182
  chat["question"].append(input_text)
183
  chat["answer"].append(answer)
184
 
185
+
 
 
186
 
187
 
188
  def init_css():