renad-108 commited on
Commit
e842133
·
verified ·
1 Parent(s): 38e67aa

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +9 -9
src/streamlit_app.py CHANGED
@@ -91,17 +91,17 @@ def gpt_decide(shift, eligible_df):
91
  return {"action": "skip"}
92
 
93
  # الزر الرئيسي في المركز
94
- st.markdown("""
95
- <div class="container">
96
- <form method="post">
 
97
  <button class="cta-button" type="submit">🤖 Unleash the AI Agent</button>
98
- </form>
99
- </div>
100
- """, unsafe_allow_html=True)
 
 
101
 
102
- # تشغيل الذكاء الصناعي بعد الضغط
103
- if st.session_state.get("btn_clicked") != True and st.form_submit_button("Run"):
104
- st.session_state["btn_clicked"] = True
105
 
106
  if "btn_clicked" in st.session_state and st.session_state["btn_clicked"]:
107
  shift_assignment_results = []
 
91
  return {"action": "skip"}
92
 
93
  # الزر الرئيسي في المركز
94
+ # الزر الرئيسي في المركز باستخدام st.form
95
+ with st.form("ai_agent_form"):
96
+ st.markdown("""
97
+ <div class="container">
98
  <button class="cta-button" type="submit">🤖 Unleash the AI Agent</button>
99
+ </div>
100
+ """, unsafe_allow_html=True)
101
+ submitted = st.form_submit_button("Run")
102
+ if submitted:
103
+ st.session_state["btn_clicked"] = True
104
 
 
 
 
105
 
106
  if "btn_clicked" in st.session_state and st.session_state["btn_clicked"]:
107
  shift_assignment_results = []