Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,12 +51,14 @@ if st.session_state['pre_url'] != url:
|
|
51 |
st.session_state['pre_url'] = url
|
52 |
|
53 |
# Step 2: Request for analysis or chart
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
57 |
|
58 |
# Execute chat and display results
|
59 |
-
if
|
60 |
if st.session_state['agent'] is not None:
|
61 |
file = st.session_state['agent'].chat(request)
|
62 |
if os.path.exists(file):
|
|
|
51 |
st.session_state['pre_url'] = url
|
52 |
|
53 |
# Step 2: Request for analysis or chart
|
54 |
+
with st.form('Analyze'):
|
55 |
+
request = st.text_input(
|
56 |
+
"Enter your analysis request:",
|
57 |
+
"Plot a histogram about the distribution of agree, disagree and neutral comments against the topic")
|
58 |
+
submit_button = st.form_submit_button(label="Analyze")
|
59 |
|
60 |
# Execute chat and display results
|
61 |
+
if submit_button:
|
62 |
if st.session_state['agent'] is not None:
|
63 |
file = st.session_state['agent'].chat(request)
|
64 |
if os.path.exists(file):
|