Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ HF_TOKEN = os.getenv('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 |
-
|
14 |
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "celebrity-set-dataset")
|
15 |
|
16 |
# Ensure consistently generated images
|
@@ -45,7 +45,7 @@ gr.Interface(
|
|
45 |
label = 'Movie / Show / Setting')
|
46 |
],
|
47 |
fn = generate,
|
48 |
-
outputs = "image"
|
49 |
allow_flagging = "manual",
|
50 |
flagging_options = ["Looks good", "Looks bad"],
|
51 |
flagging_callback = hf_writer
|
|
|
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(HF_TOKEN, "celebrity-set-dataset")
|
15 |
|
16 |
# Ensure consistently generated images
|
|
|
45 |
label = 'Movie / Show / Setting')
|
46 |
],
|
47 |
fn = generate,
|
48 |
+
outputs = "image",
|
49 |
allow_flagging = "manual",
|
50 |
flagging_options = ["Looks good", "Looks bad"],
|
51 |
flagging_callback = hf_writer
|