sschet commited on
Commit
aa280c4
·
1 Parent(s): 21194b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -21,10 +21,8 @@ def main():
21
  if 'chat_history' not in st.session_state:
22
  st.session_state['chat_history'] = ''
23
 
24
- st.session_state['chat_history'] += "<div style='color: blue;'>You: </div><br>"
25
- print(type(st.session_state['chat_history']))
26
- print(st.session_state['chat_history'])
27
- st.markdown(st.session_state['chat_history'], unsafe_allow_html=True)
28
 
29
  #st.session_state['chat_history'].append("<div style='color: blue;'>You: </div>")
30
  #st.session_state['chat_history'].append("<div style='color: red;'>MidikanGPT-4: </div>")
@@ -41,8 +39,8 @@ def main():
41
  prompt_1 = prompt_1.strip()
42
 
43
  # Save 'prompt_1' to the chat history
44
- #{prompt_1}
45
- st.session_state['chat_history'].append(f"<div style='color: blue;'>You: </div>")
46
 
47
  # Hit the OpenAI API with 'prompt_1'
48
  response = openai.ChatCompletion.create(
@@ -109,6 +107,7 @@ def main():
109
  st.session_state['chat_history'].append(f"SmartGPT-4: {answers_3}")
110
 
111
  # Creating an area to display the chat history
 
112
  for message in st.session_state['chat_history']:
113
  st.markdown(message)
114
 
 
21
  if 'chat_history' not in st.session_state:
22
  st.session_state['chat_history'] = ''
23
 
24
+
25
+
 
 
26
 
27
  #st.session_state['chat_history'].append("<div style='color: blue;'>You: </div>")
28
  #st.session_state['chat_history'].append("<div style='color: red;'>MidikanGPT-4: </div>")
 
39
  prompt_1 = prompt_1.strip()
40
 
41
  # Save 'prompt_1' to the chat history
42
+ st.session_state['chat_history'] += "<div style='color: blue;'>You: </div><br><hr style='border: 1px solid black;'>"
43
+ st.session_state['chat_history'] += f"{prompt_1}")
44
 
45
  # Hit the OpenAI API with 'prompt_1'
46
  response = openai.ChatCompletion.create(
 
107
  st.session_state['chat_history'].append(f"SmartGPT-4: {answers_3}")
108
 
109
  # Creating an area to display the chat history
110
+ st.markdown(st.session_state['chat_history'], unsafe_allow_html=True)
111
  for message in st.session_state['chat_history']:
112
  st.markdown(message)
113