Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,12 +6,11 @@ import torch
|
|
| 6 |
|
| 7 |
SEED = 42
|
| 8 |
AUTH_TOKEN = os.environ.get("auth_token")
|
| 9 |
-
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 10 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 11 |
|
| 12 |
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=AUTH_TOKEN)
|
| 13 |
pipe = pipe.to(DEVICE)
|
| 14 |
-
hf_writer = gr.HuggingFaceDatasetSaver(
|
| 15 |
|
| 16 |
# Ensure consistently generated images
|
| 17 |
generator = torch.Generator(device=DEVICE).manual_seed(SEED)
|
|
|
|
| 6 |
|
| 7 |
SEED = 42
|
| 8 |
AUTH_TOKEN = os.environ.get("auth_token")
|
|
|
|
| 9 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 10 |
|
| 11 |
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=AUTH_TOKEN)
|
| 12 |
pipe = pipe.to(DEVICE)
|
| 13 |
+
hf_writer = gr.HuggingFaceDatasetSaver(AUTH_TOKEN, "celebrity-set-dataset")
|
| 14 |
|
| 15 |
# Ensure consistently generated images
|
| 16 |
generator = torch.Generator(device=DEVICE).manual_seed(SEED)
|