Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
import os
|
|
|
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
# Example command to set an environment variable (this is not effective for parent Python processes)
|
| 5 |
token=os.environ['token']
|
| 6 |
-
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# This will not make HUGGINGFACE_TOKEN accessible in the Python script outside the os.system call.
|
| 9 |
|
|
|
|
| 1 |
import os
|
| 2 |
+
from huggingface_hub import login
|
| 3 |
+
|
| 4 |
|
| 5 |
|
| 6 |
# Example command to set an environment variable (this is not effective for parent Python processes)
|
| 7 |
token=os.environ['token']
|
| 8 |
+
access_token_read = token
|
| 9 |
+
login(token = access_token_read)
|
| 10 |
+
#os.environ['HUGGINGFACE_TOKEN'] = token
|
| 11 |
|
| 12 |
# This will not make HUGGINGFACE_TOKEN accessible in the Python script outside the os.system call.
|
| 13 |
|