neovalle commited on
Commit
9765e8e
·
verified ·
1 Parent(s): 88c675c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -15,16 +15,15 @@ import gradio as gr
15
  #if not OPENAI_API_KEY:
16
  # raise Exception("OPENAI_API_KEY not found in environment variables. Please add it as a secret in your Space.")
17
 
18
- from google.colab import userdata
19
 
20
- #COHERE_API_KEY = os.environ.get("COHERE_API_KEY")
21
- COHERE_API_KEY = userdata.get('cohere_key')
22
 
23
  if not COHERE_API_KEY:
24
  raise Exception("COHERE_API_KEY not found in environment variables. Please add it as a secret in your Space.")
25
 
26
- #HF_API_TOKEN = os.environ.get("HF_TOKEN")
27
- HF_API_TOKEN = userdata.get('hf_token')
28
  hf_headers = {}
29
  if HF_API_TOKEN:
30
  hf_headers = {"Authorization": f"Bearer {HF_API_TOKEN}"}
 
15
  #if not OPENAI_API_KEY:
16
  # raise Exception("OPENAI_API_KEY not found in environment variables. Please add it as a secret in your Space.")
17
 
 
18
 
19
+ COHERE_API_KEY = os.environ.get("COHERE_API_KEY")
20
+
21
 
22
  if not COHERE_API_KEY:
23
  raise Exception("COHERE_API_KEY not found in environment variables. Please add it as a secret in your Space.")
24
 
25
+ HF_API_TOKEN = os.environ.get("HF_TOKEN")
26
+
27
  hf_headers = {}
28
  if HF_API_TOKEN:
29
  hf_headers = {"Authorization": f"Bearer {HF_API_TOKEN}"}