awacke1 commited on
Commit
48cbebc
·
1 Parent(s): 4510786

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -157,9 +157,10 @@ def chat_with_model(prompt, document_section, model_choice='gpt-3.5-turbo'):
157
  # then strip out any empty strings
158
 
159
  report.append(content)
160
- result = "".join(report).strip()
161
- result = result.replace("\n", "")
162
- res_box.markdown(f'*{result}*')
 
163
 
164
  full_reply_content = ''.join([m.get('content', '') for m in collected_messages])
165
  #st.write(f"Full conversation received: {full_reply_content}")
 
157
  # then strip out any empty strings
158
 
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
 
165
  full_reply_content = ''.join([m.get('content', '') for m in collected_messages])
166
  #st.write(f"Full conversation received: {full_reply_content}")