zakerytclarke commited on
Commit
45f3194
·
verified ·
1 Parent(s): 36e520e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -304,10 +304,7 @@ def handle_chat(user_prompt, user_input, teapot_ai):
304
 
305
  return response
306
 
307
- def suggestion_button(suggestion_text):
308
- if st.button(suggestion_text, use_container_width=True):
309
- return suggestion_text
310
-
311
  def main():
312
  st.set_page_config(page_title="TeapotAI Chat", page_icon=":robot_face:", layout="wide")
313
 
@@ -339,13 +336,15 @@ def main():
339
  s1, s2, s3 = st.columns([1, 1, 1])
340
 
341
  with s1:
342
- user_input = suggestion_button(choice1) or user_input
 
343
 
344
  with s2:
345
- user_input = suggestion_button(choice2) or user_input
346
-
347
  with s3:
348
- user_input = suggestion_button(choice3) or user_input
 
349
 
350
  if user_input:
351
  with st.spinner('Generating Response...'):
 
304
 
305
  return response
306
 
307
+
 
 
 
308
  def main():
309
  st.set_page_config(page_title="TeapotAI Chat", page_icon=":robot_face:", layout="wide")
310
 
 
336
  s1, s2, s3 = st.columns([1, 1, 1])
337
 
338
  with s1:
339
+ if st.button(choice1):
340
+ user_input = choice1
341
 
342
  with s2:
343
+ if st.button(choice2):
344
+ user_input = choice2
345
  with s3:
346
+ if st.button(choice3):
347
+ user_input = choice3
348
 
349
  if user_input:
350
  with st.spinner('Generating Response...'):