Benjamin Consolvo commited on
Commit
e7b14e0
·
1 Parent(s): f9272a3

header chatbot

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -11,7 +11,8 @@ endpoint_data = json.load(open(f"{working_dir}/model_info.json"))
11
  def clear_chat():
12
  st.session_state.messages = []
13
 
14
- st.title("Intel® AI for Enterprise Inference \n Chatbot")
 
15
 
16
  # Extract the keys (model names) from the JSON data
17
  model_names = list(endpoint_data.keys())
@@ -22,7 +23,8 @@ with st.sidebar:
22
  st.write(f"You selected: {modelname}")
23
  st.button("Start New Chat", on_click=clear_chat)
24
  try:
25
- st.session_state.api_key = st.secrets["openai_apikey2"]
 
26
  except KeyError:
27
  # Add a text input for the API key if not in session state
28
  api_key = st.text_input("Enter your API Key", type="password")
 
11
  def clear_chat():
12
  st.session_state.messages = []
13
 
14
+ st.title("Intel® AI for Enterprise Inference")
15
+ st.header("LLM chatbot")
16
 
17
  # Extract the keys (model names) from the JSON data
18
  model_names = list(endpoint_data.keys())
 
23
  st.write(f"You selected: {modelname}")
24
  st.button("Start New Chat", on_click=clear_chat)
25
  try:
26
+ #if you can provide the API key in the HF settings under "Variables and secrets", you will not need to enter your OpenAI-compatible API key every time.
27
+ st.session_state.api_key = st.secrets["openai_apikey"]
28
  except KeyError:
29
  # Add a text input for the API key if not in session state
30
  api_key = st.text_input("Enter your API Key", type="password")