Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,7 +72,13 @@ def generate_images(image, prompt, image_file_live_opt='file', live_conditioning
|
|
| 72 |
raise gr.Error("Please provide an image")
|
| 73 |
try:
|
| 74 |
if image_file_live_opt == 'file':
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
elif image_file_live_opt == 'webcam':
|
| 77 |
base64_img = live_conditioning['image']
|
| 78 |
image_data = base64.b64decode(base64_img.split(',')[1])
|
|
|
|
| 72 |
raise gr.Error("Please provide an image")
|
| 73 |
try:
|
| 74 |
if image_file_live_opt == 'file':
|
| 75 |
+
|
| 76 |
+
base64_img = live_conditioning['image']
|
| 77 |
+
image_data = base64.b64decode(base64_img.split(',')[1])
|
| 78 |
+
pose = Image.open(BytesIO(image_data)).convert(
|
| 79 |
+
'RGB').resize((512, 512))
|
| 80 |
+
|
| 81 |
+
#pose = get_pose(image)
|
| 82 |
elif image_file_live_opt == 'webcam':
|
| 83 |
base64_img = live_conditioning['image']
|
| 84 |
image_data = base64.b64decode(base64_img.split(',')[1])
|