Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,15 @@ import gradio as gr
|
|
10 |
|
11 |
from src.flux.xflux_pipeline import XFluxPipeline
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
def list_dirs(path):
|
15 |
if path is None or path == "None" or path == "":
|
|
|
10 |
|
11 |
from src.flux.xflux_pipeline import XFluxPipeline
|
12 |
|
13 |
+
import os
|
14 |
+
from huggingface_hub import login
|
15 |
+
|
16 |
+
hf_token = os.getenv("HF_TOKEN")
|
17 |
+
if hf_token:
|
18 |
+
login(token=hf_token)
|
19 |
+
else:
|
20 |
+
print("No Hugging Face token found.")
|
21 |
+
|
22 |
|
23 |
def list_dirs(path):
|
24 |
if path is None or path == "None" or path == "":
|