ai01firebird commited on
Commit
7f98a0a
·
verified ·
1 Parent(s): 6e78d03

set inf key

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -12,8 +12,8 @@ import re
12
  #)
13
 
14
  # Load API key from environment variables
15
- HF_API_TOKEN = os.getenv("HUG_TOKEN_READ2")
16
- #HF_INF_PROVIDERS_TOKEN
17
  #HF_INF_KEY = os.getenv("INF_NEBIUS")
18
 
19
  # Hugging Face Inference API Client
@@ -24,8 +24,7 @@ HF_API_TOKEN = os.getenv("HUG_TOKEN_READ2")
24
  #client = InferenceClient(model="openai-community/gpt2", token=HF_API_TOKEN)
25
  client = InferenceClient(
26
  provider="nebius",
27
- #api_key="hf_xxxxxxxxxxxxxxxxxxxxxxxx",
28
- api_key=HF_API_TOKEN
29
  )
30
 
31
  # Function to translate text into emojis
 
12
  #)
13
 
14
  # Load API key from environment variables
15
+ #HF_API_TOKEN = os.getenv("HUG_TOKEN_READ2")
16
+ HF_INF_KEY = os.getenv("HF_INF_PROVIDERS_TOKEN")
17
  #HF_INF_KEY = os.getenv("INF_NEBIUS")
18
 
19
  # Hugging Face Inference API Client
 
24
  #client = InferenceClient(model="openai-community/gpt2", token=HF_API_TOKEN)
25
  client = InferenceClient(
26
  provider="nebius",
27
+ api_key=HF_INF_KEY
 
28
  )
29
 
30
  # Function to translate text into emojis