ngebodh commited on
Commit
dab5cc9
1 Parent(s): be9d4b9

Updated with API key call

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,8 +3,8 @@ from openai import OpenAI
3
  import os
4
  import sys
5
  from langchain.callbacks import StreamlitCallbackHandler
6
- # from dotenv import load_dotenv, dotenv_values
7
- # load_dotenv()
8
 
9
 
10
  if 'key' not in st.session_state:
@@ -16,7 +16,7 @@ if 'key' not in st.session_state:
16
  # initialize the client but point it to TGI
17
  client = OpenAI(
18
  base_url="https://api-inference.huggingface.co/v1",
19
- #api_key=os.environ.get('HUGGINGFACEHUB_API_TOKEN')#"hf_xxx" # Replace with your token
20
  )
21
 
22
 
 
3
  import os
4
  import sys
5
  from langchain.callbacks import StreamlitCallbackHandler
6
+ from dotenv import load_dotenv, dotenv_values
7
+ load_dotenv()
8
 
9
 
10
  if 'key' not in st.session_state:
 
16
  # initialize the client but point it to TGI
17
  client = OpenAI(
18
  base_url="https://api-inference.huggingface.co/v1",
19
+ api_key=os.environ.get('HUGGINGFACEHUB_API_TOKEN')#"hf_xxx" # Replace with your token
20
  )
21
 
22