Spaces:
Runtime error
Runtime error
updated ap.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,11 @@ import random
|
|
| 4 |
#import spaces #[uncomment to use ZeroGPU]
|
| 5 |
from diffusers import DiffusionPipeline
|
| 6 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 9 |
model_repo_id = "black-forest-labs/FLUX.1-dev" #Replace to the model you would like to use
|
|
|
|
| 4 |
#import spaces #[uncomment to use ZeroGPU]
|
| 5 |
from diffusers import DiffusionPipeline
|
| 6 |
import torch
|
| 7 |
+
import os
|
| 8 |
+
from huggingface_hub import login
|
| 9 |
+
|
| 10 |
+
token = os.getenv("HUGGINGFACE_HUB_TOKEN")
|
| 11 |
+
login(token=token)
|
| 12 |
|
| 13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 14 |
model_repo_id = "black-forest-labs/FLUX.1-dev" #Replace to the model you would like to use
|