aagoluoglu commited on
Commit
ebb8e5d
·
verified ·
1 Parent(s): a176444

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -252,8 +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
- prediction = prediction[:height, :width]
256
- axes[2].imshow(prediction) # Setting extent to match original image dimensions
 
257
  axes[2].set_title("Prediction")
258
 
259
  # 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 = Image.fromarray(prediction)
256
+ prediction = prediction.crop((0,0,width,height))
257
+ axes[2].imshow(prediction, 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