Spaces:
Build error
Build error
Trang Dang
commited on
Commit
·
e01d5f6
1
Parent(s):
7c72540
change color
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def server(input: Inputs, output: Outputs, session: Session):
|
|
34 |
def image():
|
35 |
if input.image_input():
|
36 |
src = input.image_input()[0]['datapath']
|
37 |
-
img = {"src": src, "width": "
|
38 |
return img
|
39 |
return None
|
40 |
|
@@ -46,8 +46,10 @@ def server(input: Inputs, output: Outputs, session: Session):
|
|
46 |
prob, prediction = run.pred(src)
|
47 |
fig, axes = plt.subplots(1, 2, figsize=(60, 30))
|
48 |
|
49 |
-
axes[0].imshow(prob, cmap='turbo')
|
50 |
axes[0].set_title("Probability Map")
|
|
|
|
|
51 |
|
52 |
axes[1].imshow(prediction, cmap='gray')
|
53 |
axes[1].set_title("Prediction")
|
|
|
34 |
def image():
|
35 |
if input.image_input():
|
36 |
src = input.image_input()[0]['datapath']
|
37 |
+
img = {"src": src, "width": "500px"}
|
38 |
return img
|
39 |
return None
|
40 |
|
|
|
46 |
prob, prediction = run.pred(src)
|
47 |
fig, axes = plt.subplots(1, 2, figsize=(60, 30))
|
48 |
|
49 |
+
im = axes[0].imshow(prob, cmap='turbo')
|
50 |
axes[0].set_title("Probability Map")
|
51 |
+
cbar = fig.colorbar(im, ax=axes[0])
|
52 |
+
|
53 |
|
54 |
axes[1].imshow(prediction, cmap='gray')
|
55 |
axes[1].set_title("Prediction")
|