npc0 commited on
Commit
0378cb0
1 Parent(s): 0c8bb43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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
- request = st.text_input(
55
- "Enter your analysis request:",
56
- "Plot a histogram about the distribution of agree, disagree and neutral comments against the topic")
 
 
57
 
58
  # Execute chat and display results
59
- if st.button("Analyze"):
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):