binaychandra commited on
Commit
0532618
·
verified ·
1 Parent(s): 13590ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -76,12 +76,12 @@ examples = [
76
  "Give me the monthly sales trend for the last year.",
77
  ]
78
 
79
- # Display examples with a button to load them into the chat
80
  for example in examples:
81
  if st.button(f"Ask: {example}"):
82
- # Populate input with example and submit
83
- st.session_state["chat_input"] = example
84
- chat_actions()
85
 
86
  with st.chat_message("assistant"):
87
  st.write("Hello 👋 How can I help you today?")
 
76
  "Give me the monthly sales trend for the last year.",
77
  ]
78
 
79
+ # Display examples with a button to load them as input
80
  for example in examples:
81
  if st.button(f"Ask: {example}"):
82
+ # Set the example text in a temporary session key and submit
83
+ st.session_state["example_input"] = example
84
+ chat_actions() # Trigger chat as if user entered this example
85
 
86
  with st.chat_message("assistant"):
87
  st.write("Hello 👋 How can I help you today?")