Spaces:
Sleeping
Sleeping
Commit
·
89166c3
1
Parent(s):
e765b22
Update app.py
Browse files
app.py
CHANGED
@@ -21,9 +21,9 @@ if st.button("Submit", type="primary"):
|
|
21 |
):
|
22 |
content.append(chunk["choices"][0].get("delta", {}).get("content"))
|
23 |
if content is not None:
|
24 |
-
|
25 |
else:
|
26 |
-
|
27 |
result = result.replace("\n", "")
|
28 |
res_box.markdown(result)
|
29 |
st.markdown("----")
|
|
|
21 |
):
|
22 |
content.append(chunk["choices"][0].get("delta", {}).get("content"))
|
23 |
if content is not None:
|
24 |
+
result = "".join(content).strip()
|
25 |
else:
|
26 |
+
result = ""
|
27 |
result = result.replace("\n", "")
|
28 |
res_box.markdown(result)
|
29 |
st.markdown("----")
|