Spaces:
Running
on
Zero
Running
on
Zero
login to huggingface
Browse files
app.py
CHANGED
@@ -4,10 +4,14 @@ import time
|
|
4 |
import torch
|
5 |
import gradio as gr
|
6 |
from PIL import Image
|
7 |
-
from huggingface_hub import hf_hub_download, list_repo_files
|
8 |
from src_inference.pipeline import FluxPipeline
|
9 |
from src_inference.lora_helper import set_single_lora
|
10 |
|
|
|
|
|
|
|
|
|
11 |
BASE_PATH = "black-forest-labs/FLUX.1-dev"
|
12 |
LOCAL_LORA_DIR = "./LoRAs"
|
13 |
CUSTOM_LORA_DIR = "./Custom_LoRAs"
|
|
|
4 |
import torch
|
5 |
import gradio as gr
|
6 |
from PIL import Image
|
7 |
+
from huggingface_hub import hf_hub_download, list_repo_files, login
|
8 |
from src_inference.pipeline import FluxPipeline
|
9 |
from src_inference.lora_helper import set_single_lora
|
10 |
|
11 |
+
HF_TOKEN = os.environ.get("HF_TOKEN")
|
12 |
+
if HF_TOKEN:
|
13 |
+
login(token=HF_TOKEN)
|
14 |
+
|
15 |
BASE_PATH = "black-forest-labs/FLUX.1-dev"
|
16 |
LOCAL_LORA_DIR = "./LoRAs"
|
17 |
CUSTOM_LORA_DIR = "./Custom_LoRAs"
|