Spaces:
Paused
Paused
test gradio
Browse files
app.py
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
from diffusers import StableDiffusionControlNetPipeline, ControlNetModel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# Load Stable Diffusion model and ControlNet reference-only model
|
| 6 |
model_id = "stabilityai/stable-diffusion-3.5-large-turbo"
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
from diffusers import StableDiffusionControlNetPipeline, ControlNetModel
|
| 4 |
+
import os
|
| 5 |
+
from huggingface_hub import HfApi, login
|
| 6 |
+
|
| 7 |
+
token = os.getenv("HF_TOKEN")
|
| 8 |
+
login(token=token) # Logs in with the token in Hugging Face Spaces
|
| 9 |
|
| 10 |
# Load Stable Diffusion model and ControlNet reference-only model
|
| 11 |
model_id = "stabilityai/stable-diffusion-3.5-large-turbo"
|