Spaces:
Runtime error
Runtime error
updated requirements
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def generate_view(source_img, elevation, azimuth, camera_distance, num_inference
|
|
13 |
pipeline.to('cuda:0')
|
14 |
|
15 |
# Prepare input data:
|
16 |
-
image = source_img.resize((256, 256))
|
17 |
|
18 |
|
19 |
# Generate and save images:
|
@@ -26,7 +26,7 @@ def generate_view(source_img, elevation, azimuth, camera_distance, num_inference
|
|
26 |
return images[0]
|
27 |
|
28 |
|
29 |
-
iface = gr.Interface(fn=generate_view, inputs=[gr.Image(type="pil",
|
30 |
gr.Number(label="elevation", value=0.),
|
31 |
gr.Number(label="azimuth", value=45.),
|
32 |
gr.Number(label="camera_distance", value=1.2),
|
|
|
13 |
pipeline.to('cuda:0')
|
14 |
|
15 |
# Prepare input data:
|
16 |
+
image = source_img.resize((256, 256)).convert("RGB")
|
17 |
|
18 |
|
19 |
# Generate and save images:
|
|
|
26 |
return images[0]
|
27 |
|
28 |
|
29 |
+
iface = gr.Interface(fn=generate_view, inputs=[gr.Image(type="pil", value="images/bottle.png"),
|
30 |
gr.Number(label="elevation", value=0.),
|
31 |
gr.Number(label="azimuth", value=45.),
|
32 |
gr.Number(label="camera_distance", value=1.2),
|