Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -252,9 +252,9 @@ def server(input: Inputs, output: Outputs, session: Session):
|
|
252 |
axes[1].set_title("Probability Map")
|
253 |
|
254 |
# Plot the prediction image on the right
|
255 |
-
|
256 |
-
|
257 |
-
axes[2].imshow(
|
258 |
axes[2].set_title("Prediction")
|
259 |
|
260 |
# Plot the predicted mask on the right
|
|
|
252 |
axes[1].set_title("Probability Map")
|
253 |
|
254 |
# Plot the prediction image on the right
|
255 |
+
prediction_im = Image.fromarray(prediction)
|
256 |
+
prediction_im = prediction_im.crop((0,0,width,height))
|
257 |
+
axes[2].imshow(prediction_im, extent=(0, width, height, 0)) # Setting extent to match original image dimensions
|
258 |
axes[2].set_title("Prediction")
|
259 |
|
260 |
# Plot the predicted mask on the right
|