yunuseduran commited on
Commit
8cb8cde
·
verified ·
1 Parent(s): 5e0b93e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,9 +36,9 @@ if st.button('Ask'):
36
 
37
  # Display chat history
38
  for message in response.choices[0]['message']['content']:
39
- if message.role == 'user':
40
  st.markdown(f'<div style="text-align: right; background-color: #2F2F2F; padding: 10px; border-radius: 10px; margin: 10px; width: fit-content;">👤 Sen: {message["text"]}</div>', unsafe_allow_html=True)
41
- elif message.role == 'model':
42
  st.markdown(f'<div style="text-align: left; background-color: #2E2E2E; padding: 10px; border-radius: 10px; margin: 10px; width: fit-content;">🤖 Bot: {message["text"]}</div>', unsafe_allow_html=True)
43
 
44
  # Handle "Yeni Sohbet" button click
 
36
 
37
  # Display chat history
38
  for message in response.choices[0]['message']['content']:
39
+ if message['role'] == 'user':
40
  st.markdown(f'<div style="text-align: right; background-color: #2F2F2F; padding: 10px; border-radius: 10px; margin: 10px; width: fit-content;">👤 Sen: {message["text"]}</div>', unsafe_allow_html=True)
41
+ elif message['role'] == 'model':
42
  st.markdown(f'<div style="text-align: left; background-color: #2E2E2E; padding: 10px; border-radius: 10px; margin: 10px; width: fit-content;">🤖 Bot: {message["text"]}</div>', unsafe_allow_html=True)
43
 
44
  # Handle "Yeni Sohbet" button click