Spaces:
Runtime error
Runtime error
auth
Browse files- app.py +5 -0
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -14,6 +14,11 @@ from upsampling import get_pipeline, upscale_image
|
|
| 14 |
|
| 15 |
import gradio as gr
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# fix randomness
|
| 18 |
th.manual_seed(0)
|
| 19 |
np.random.seed(0)
|
|
|
|
| 14 |
|
| 15 |
import gradio as gr
|
| 16 |
|
| 17 |
+
from huggingface_hub import HfApi
|
| 18 |
+
|
| 19 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
| 20 |
+
hf_api = HfApi(token=HF_TOKEN)
|
| 21 |
+
|
| 22 |
# fix randomness
|
| 23 |
th.manual_seed(0)
|
| 24 |
np.random.seed(0)
|
requirements.txt
CHANGED
|
@@ -7,4 +7,5 @@ safetensors~=0.3
|
|
| 7 |
sentencepiece~=0.1
|
| 8 |
accelerate~=0.18
|
| 9 |
bitsandbytes~=0.38
|
| 10 |
-
torch~=2.0
|
|
|
|
|
|
| 7 |
sentencepiece~=0.1
|
| 8 |
accelerate~=0.18
|
| 9 |
bitsandbytes~=0.38
|
| 10 |
+
torch~=2.0
|
| 11 |
+
huggingface_hub==0.14.1
|