Spaces:
Running
Running
Update app.py
Browse files
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
|
| 80 |
for example in examples:
|
| 81 |
if st.button(f"Ask: {example}"):
|
| 82 |
-
#
|
| 83 |
-
st.session_state["
|
| 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?")
|