andreska commited on
Commit
972f7cf
·
verified ·
1 Parent(s): e304e83

Gemini fix try#2

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -35,6 +35,9 @@ st.markdown(
35
  unsafe_allow_html=True
36
  )
37
 
 
 
 
38
  def handle_submit():
39
  user_input = st.session_state.user_input
40
 
@@ -68,10 +71,6 @@ def handle_submit():
68
  else:
69
  st.session_state.conversation(f"<p><strong>Adrega AI:</strong>: Please enter a question.")
70
 
71
- # Create the placeholder element only once
72
- if 'placeholder' not in st.session_state:
73
- placeholder = st.session_state.placeholder = st.empty()
74
-
75
  st.text_input('Ask me a question', key='user_input', on_change=handle_submit)
76
  col1, col2 = st.columns(2)
77
 
 
35
  unsafe_allow_html=True
36
  )
37
 
38
+ # Define the placeholder globally
39
+ placeholder = st.empty()
40
+
41
  def handle_submit():
42
  user_input = st.session_state.user_input
43
 
 
71
  else:
72
  st.session_state.conversation(f"<p><strong>Adrega AI:</strong>: Please enter a question.")
73
 
 
 
 
 
74
  st.text_input('Ask me a question', key='user_input', on_change=handle_submit)
75
  col1, col2 = st.columns(2)
76