zakerytclarke commited on
Commit
87b2e52
·
verified ·
1 Parent(s): ae7ad2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -304,7 +304,10 @@ def handle_chat(prompt, user_input, teapot_ai):
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
 
@@ -325,11 +328,11 @@ def main():
325
 
326
  s1, s2, s3 = st.columns([1, 2, 3])
327
  with s1:
328
- user_input = "Tell me about teapotllm"
329
  with s2:
330
- user_input = "Who invented quantum mechanics?"
331
  with s3:
332
- user_input = "Extract the year Google was founded"
333
 
334
  if user_input:
335
  with st.spinner('Generating Response...'):
 
304
 
305
  return response
306
 
307
+ def suggestion_button(suggestion_text):
308
+ if st.button(suggestion_text):
309
+ return suggestion_text
310
+
311
  def main():
312
  st.set_page_config(page_title="TeapotAI Chat", page_icon=":robot_face:", layout="wide")
313
 
 
328
 
329
  s1, s2, s3 = st.columns([1, 2, 3])
330
  with s1:
331
+ user_input = suggestion_button("Tell me about teapotllm")
332
  with s2:
333
+ user_input = suggestion_button("Who invented quantum mechanics?")
334
  with s3:
335
+ user_input = suggestion_button("Extract the year Google was founded")
336
 
337
  if user_input:
338
  with st.spinner('Generating Response...'):