Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,6 @@ def process_image(prompt, image, style, upscale_factor, inpaint):
|
|
30 |
return None, "No image received and failed to load test image."
|
31 |
|
32 |
try:
|
33 |
-
print(f"Received image type: {type(image)}")
|
34 |
if isinstance(image, np.ndarray):
|
35 |
image = Image.fromarray(image)
|
36 |
elif isinstance(image, torch.Tensor):
|
@@ -38,6 +37,8 @@ def process_image(prompt, image, style, upscale_factor, inpaint):
|
|
38 |
elif not isinstance(image, Image.Image):
|
39 |
return None, f"Unsupported image format: {type(image)}."
|
40 |
|
|
|
|
|
41 |
return image, None
|
42 |
except Exception as e:
|
43 |
error_message = f"Error in process_image function: {e}"
|
|
|
30 |
return None, "No image received and failed to load test image."
|
31 |
|
32 |
try:
|
|
|
33 |
if isinstance(image, np.ndarray):
|
34 |
image = Image.fromarray(image)
|
35 |
elif isinstance(image, torch.Tensor):
|
|
|
37 |
elif not isinstance(image, Image.Image):
|
38 |
return None, f"Unsupported image format: {type(image)}."
|
39 |
|
40 |
+
print(f"Received image: {image.size}")
|
41 |
+
# Placeholder for processing logic
|
42 |
return image, None
|
43 |
except Exception as e:
|
44 |
error_message = f"Error in process_image function: {e}"
|