Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
b0a2a59
1
Parent(s):
4feff7d
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,19 @@ if text:
|
|
11 |
st.json(out)
|
12 |
|
13 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
import torch
|
16 |
import torchaudio
|
|
|
11 |
st.json(out)
|
12 |
|
13 |
"""
|
14 |
+
import os
|
15 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
16 |
+
|
17 |
+
from huggingface_hub import HfFolder
|
18 |
+
|
19 |
+
# Set the token using HfFolder (this persists the token)
|
20 |
+
HfFolder.save_token(HF_TOKEN)
|
21 |
+
|
22 |
+
"""
|
23 |
+
from transformers import set_access_token
|
24 |
+
set_access_token(HF_TOKEN)
|
25 |
+
"""
|
26 |
+
|
27 |
|
28 |
import torch
|
29 |
import torchaudio
|