Spaces:
Sleeping
Sleeping
Try make placeholder for output below buttons and input
Browse files
app.py
CHANGED
|
@@ -61,8 +61,7 @@ def handle_submit():
|
|
| 61 |
)
|
| 62 |
|
| 63 |
answer = ""
|
| 64 |
-
|
| 65 |
-
placeholder.markdown('<div class="scrollable-div"></div>', unsafe_allow_html=True)
|
| 66 |
for chunk in response:
|
| 67 |
answer += chunk['choices'][0]['delta']['content']
|
| 68 |
placeholder.markdown(f'<div class="scrollable-div"><p>{answer}</p></div>', unsafe_allow_html=True)
|
|
@@ -85,5 +84,7 @@ if 'conversation' not in st.session_state:
|
|
| 85 |
with col2:
|
| 86 |
st.session_state.include_context = st.checkbox('Search in Help')
|
| 87 |
|
| 88 |
-
placeholder
|
|
|
|
|
|
|
| 89 |
#st.markdown(f'<div class="scrollable-div">{st.session_state.conversation}</div>', unsafe_allow_html=True)
|
|
|
|
| 61 |
)
|
| 62 |
|
| 63 |
answer = ""
|
| 64 |
+
placeholder = st.session_state.placeholder
|
|
|
|
| 65 |
for chunk in response:
|
| 66 |
answer += chunk['choices'][0]['delta']['content']
|
| 67 |
placeholder.markdown(f'<div class="scrollable-div"><p>{answer}</p></div>', unsafe_allow_html=True)
|
|
|
|
| 84 |
with col2:
|
| 85 |
st.session_state.include_context = st.checkbox('Search in Help')
|
| 86 |
|
| 87 |
+
if 'placeholder' not in st.session_state:
|
| 88 |
+
st.session_state.placeholder = st.empty()
|
| 89 |
+
|
| 90 |
#st.markdown(f'<div class="scrollable-div">{st.session_state.conversation}</div>', unsafe_allow_html=True)
|