Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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:
|