Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,6 +40,13 @@ if submitted:
|
|
| 40 |
# Concatenate chunks to form the full response
|
| 41 |
for chunk in stream:
|
| 42 |
full_text += chunk.choices[0].delta.content
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
| 44 |
# Display the full response
|
| 45 |
st.info(full_text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
# Concatenate chunks to form the full response
|
| 41 |
for chunk in stream:
|
| 42 |
full_text += chunk.choices[0].delta.content
|
| 43 |
+
|
| 44 |
+
# Update session state with the full response
|
| 45 |
+
st.session_state["full_text"] = full_text
|
| 46 |
+
|
| 47 |
# Display the full response
|
| 48 |
st.info(full_text)
|
| 49 |
+
|
| 50 |
+
# Display the full response
|
| 51 |
+
if st.session_state["full_text"]:
|
| 52 |
+
st.info(st.session_state["full_text"])
|