katsukiai commited on
Commit
6a80db8
·
verified ·
1 Parent(s): 4e94952

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -33,7 +33,7 @@ def generate_and_upload(text):
33
 
34
  # Authenticate with Hugging Face Hub
35
  api = HfApi()
36
- token = HfFolder.get_token()
37
  if token is None:
38
  raise ValueError("Hugging Face API token not found. Please set HUGGINGFACE_API_TOKEN environment variable.")
39
 
 
33
 
34
  # Authenticate with Hugging Face Hub
35
  api = HfApi()
36
+ token = os.environ['HUGGINGFACE_API_TOKEN']
37
  if token is None:
38
  raise ValueError("Hugging Face API token not found. Please set HUGGINGFACE_API_TOKEN environment variable.")
39