carolanderson commited on
Commit
4481118
·
1 Parent(s): 1927487

cosmetic changes

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -52,13 +52,17 @@ def get_chain(model_name, _memory, temperature):
52
 
53
 
54
  if __name__ == "__main__":
 
55
  st.header("Basic chatbot")
 
 
 
56
  with st.expander("How conversation history works"):
57
  st.write("To keep input lengths down and costs reasonable,"
58
  " this bot only 'remembers' the past three turns of conversation.")
59
  st.write("To clear all memory and start fresh, click 'Clear history'" )
60
 
61
- st.sidebar.title("Enter API key and model")
62
 
63
  USER_API_KEY = st.sidebar.text_input(
64
  'API Key',
@@ -81,7 +85,7 @@ if __name__ == "__main__":
81
  help="Set the decoding temperature. Lower temperatures give more predictable outputs."
82
  )
83
 
84
-
85
  if USER_API_KEY is not None:
86
  set_api_key(USER_API_KEY)
87
  memory = setup_memory()
@@ -100,7 +104,7 @@ if __name__ == "__main__":
100
  with st.chat_message("assistant"):
101
  st.write(result)
102
  except AuthenticationError:
103
- st.warning("Enter a valid OpenAI API key", icon="⚠️")
104
 
105
 
106
 
 
52
 
53
 
54
  if __name__ == "__main__":
55
+
56
  st.header("Basic chatbot")
57
+
58
+ st.write("On small screens, click the `>` at top left to get started")
59
+
60
  with st.expander("How conversation history works"):
61
  st.write("To keep input lengths down and costs reasonable,"
62
  " this bot only 'remembers' the past three turns of conversation.")
63
  st.write("To clear all memory and start fresh, click 'Clear history'" )
64
 
65
+ st.sidebar.title("Choose options and enter API key")
66
 
67
  USER_API_KEY = st.sidebar.text_input(
68
  'API Key',
 
85
  help="Set the decoding temperature. Lower temperatures give more predictable outputs."
86
  )
87
 
88
+
89
  if USER_API_KEY is not None:
90
  set_api_key(USER_API_KEY)
91
  memory = setup_memory()
 
104
  with st.chat_message("assistant"):
105
  st.write(result)
106
  except AuthenticationError:
107
+ st.warning("Enter a valid API key", icon="⚠️")
108
 
109
 
110