MojoHz commited on
Commit
cafbed9
·
verified ·
1 Parent(s): 5819c8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -7,7 +7,11 @@ from transformers import pipeline
7
  import gradio as gr
8
 
9
  # Access the Hugging Face token from the environment variable
10
- HF_TOKEN = os.getenv("HF_Token")
 
 
 
 
11
 
12
  # Ensure the token is loaded correctly (optional)
13
  if not HF_TOKEN:
 
7
  import gradio as gr
8
 
9
  # Access the Hugging Face token from the environment variable
10
+
11
+ from huggingface_hub import login
12
+
13
+ # Log in with token
14
+ login(token=os.getenv("HF_Token"))
15
 
16
  # Ensure the token is loaded correctly (optional)
17
  if not HF_TOKEN: