Hieucyber2208 commited on
Commit
4fdaf10
·
verified ·
1 Parent(s): 049f3db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -12,8 +12,9 @@ import subprocess
12
  from huggingface_hub import InferenceClient
13
  import google.generativeai as genai
14
 
15
- HF_TOKEN = st.secrets["secrets"]["HF_TOKEN"]
16
- GOOGLE_API_KEY = st.secrets["secrets"]["GOOGLE_API_KEY"]
 
17
  genai.configure(api_key=GOOGLE_API_KEY)
18
  client = InferenceClient(provider="hf-inference", api_key=HF_TOKEN)
19
 
 
12
  from huggingface_hub import InferenceClient
13
  import google.generativeai as genai
14
 
15
+ # Load API Keys từ biến môi trường
16
+ HF_TOKEN = os.getenv("HF_TOKEN") # Hugging Face API Key
17
+ GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY") # Google API Key
18
  genai.configure(api_key=GOOGLE_API_KEY)
19
  client = InferenceClient(provider="hf-inference", api_key=HF_TOKEN)
20