Update app.py
Browse files
app.py
CHANGED
|
@@ -155,12 +155,14 @@ def chat_with_model(prompt, document_section, model_choice='gpt-3.5-turbo'):
|
|
| 155 |
# join method to concatenate the elements of the list
|
| 156 |
# into a single string,
|
| 157 |
# then strip out any empty strings
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
|
|
|
|
|
|
| 164 |
|
| 165 |
full_reply_content = ''.join([m.get('content', '') for m in collected_messages])
|
| 166 |
#st.write(f"Full conversation received: {full_reply_content}")
|
|
|
|
| 155 |
# join method to concatenate the elements of the list
|
| 156 |
# into a single string,
|
| 157 |
# then strip out any empty strings
|
| 158 |
+
try:
|
| 159 |
+
report.append(content)
|
| 160 |
+
if len(content) > 0:
|
| 161 |
+
result = "".join(report).strip()
|
| 162 |
+
result = result.replace("\n", "")
|
| 163 |
+
res_box.markdown(f'*{result}*')
|
| 164 |
+
except:
|
| 165 |
+
st.write('.')
|
| 166 |
|
| 167 |
full_reply_content = ''.join([m.get('content', '') for m in collected_messages])
|
| 168 |
#st.write(f"Full conversation received: {full_reply_content}")
|