Spaces:
Sleeping
Sleeping
Try to reapply Stream properties instead of waiting for the whole text to complete
Browse files
app.py
CHANGED
|
@@ -67,8 +67,9 @@ def handle_submit():
|
|
| 67 |
answer = ""
|
| 68 |
for chunk in response:
|
| 69 |
answer += chunk['choices'][0]['delta']['content']
|
| 70 |
-
|
| 71 |
-
|
|
|
|
| 72 |
else:
|
| 73 |
st.session_state.conversation(f"<p><strong>Adrega AI:</strong>: Please enter a question.")
|
| 74 |
|
|
|
|
| 67 |
answer = ""
|
| 68 |
for chunk in response:
|
| 69 |
answer += chunk['choices'][0]['delta']['content']
|
| 70 |
+
placeholder.markdown(f'<div class="scrollable-div"><p>{answer}</p></div>', unsafe_allow_html=True)
|
| 71 |
+
st.session_state.conversation = f"<p>{answer}</p>" + st.session_state.conversation
|
| 72 |
+
placeholder.empty()
|
| 73 |
else:
|
| 74 |
st.session_state.conversation(f"<p><strong>Adrega AI:</strong>: Please enter a question.")
|
| 75 |
|