Spaces:
Runtime error
Runtime error
login
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
|
| 2 |
-
from huggingface_hub import hf_hub_download
|
| 3 |
import os
|
| 4 |
import spaces
|
| 5 |
import gradio as gr
|
|
@@ -8,10 +8,10 @@ import os
|
|
| 8 |
|
| 9 |
import random
|
| 10 |
token = os.environ.get("HF_TOKEN")
|
| 11 |
-
|
| 12 |
|
| 13 |
print("downloading models - 1/4")
|
| 14 |
-
hf_hub_download("black-forest-labs/FLUX.1-dev", "flux1-dev.safetensors")
|
| 15 |
print("downloading models - 2/4")
|
| 16 |
hf_hub_download("XLabs-AI/flux-controlnet-collections", "flux-depth-controlnet.safetensor")
|
| 17 |
print("downloading models - 3/4")
|
|
|
|
| 1 |
|
| 2 |
+
from huggingface_hub import hf_hub_download, login
|
| 3 |
import os
|
| 4 |
import spaces
|
| 5 |
import gradio as gr
|
|
|
|
| 8 |
|
| 9 |
import random
|
| 10 |
token = os.environ.get("HF_TOKEN")
|
| 11 |
+
login(token=token)
|
| 12 |
|
| 13 |
print("downloading models - 1/4")
|
| 14 |
+
hf_hub_download("black-forest-labs/FLUX.1-dev", "flux1-dev.safetensors", )
|
| 15 |
print("downloading models - 2/4")
|
| 16 |
hf_hub_download("XLabs-AI/flux-controlnet-collections", "flux-depth-controlnet.safetensor")
|
| 17 |
print("downloading models - 3/4")
|