Spaces:
Runtime error
Runtime error
fix button input
Browse files
app.py
CHANGED
|
@@ -176,7 +176,7 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
| 176 |
with gr.Row():
|
| 177 |
with gr.Column():
|
| 178 |
image = gr.Image(type="numpy")
|
| 179 |
-
seg_input = gr.Text(label="Entities to Segment/Detect"
|
| 180 |
|
| 181 |
with gr.Column():
|
| 182 |
annotated_image = gr.AnnotatedImage(label="Output")
|
|
@@ -187,10 +187,6 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
| 187 |
["./examples/15_242_212_25_25_jpg.rf.f6bbadf4260dd2c1f5b4ace1b09b0a1b.jpg", "detect liver disease"],
|
| 188 |
["./examples/194_jpg.rf.3e3dd592d034bb5ee27a978553819f42.jpg", "detect brain tumor"],
|
| 189 |
["./examples/239_jpg.rf.3dcc0799277fb78a2ab21db7761ccaeb.jpg", "detect brain tumor"],
|
| 190 |
-
["./examples/1385_jpg.rf.3c67cb92e2922dba0e6dba86f69df40b.jpg", "detect brain tumor"],
|
| 191 |
-
["./examples/1491_jpg.rf.3c658e83538de0fa5a3f4e13d7d85f12.jpg", "detect brain tumor"],
|
| 192 |
-
["./examples/1550_jpg.rf.3d067be9580ec32dbee5a89c675d8459.jpg", "detect brain tumor"],
|
| 193 |
-
["./examples/2256_jpg.rf.3afd7903eaf3f3c5aa8da4bbb928bc19.jpg", "detect brain tumor"],
|
| 194 |
["./examples/2871_jpg.rf.3b6eadfbb369abc2b3bcb52b406b74f2.jpg", "detect brain tumor"],
|
| 195 |
["./examples/2921_jpg.rf.3b952f91f27a6248091e7601c22323ad.jpg", "detect brain tumor"],
|
| 196 |
]
|
|
@@ -215,7 +211,7 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
| 215 |
with gr.Row():
|
| 216 |
with gr.Column():
|
| 217 |
image = gr.Image(type="numpy")
|
| 218 |
-
seg_input = gr.Text(label="Entities to Segment/Detect"
|
| 219 |
|
| 220 |
with gr.Column():
|
| 221 |
annotated_image = gr.AnnotatedImage(label="Output")
|
|
@@ -226,10 +222,6 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
| 226 |
["./examples/15_242_212_25_25_jpg.rf.f6bbadf4260dd2c1f5b4ace1b09b0a1b.jpg", "detect liver disease"],
|
| 227 |
["./examples/194_jpg.rf.3e3dd592d034bb5ee27a978553819f42.jpg", "detect brain tumor"],
|
| 228 |
["./examples/239_jpg.rf.3dcc0799277fb78a2ab21db7761ccaeb.jpg", "detect brain tumor"],
|
| 229 |
-
["./examples/1385_jpg.rf.3c67cb92e2922dba0e6dba86f69df40b.jpg", "detect brain tumor"],
|
| 230 |
-
["./examples/1491_jpg.rf.3c658e83538de0fa5a3f4e13d7d85f12.jpg", "detect brain tumor"],
|
| 231 |
-
["./examples/1550_jpg.rf.3d067be9580ec32dbee5a89c675d8459.jpg", "detect brain tumor"],
|
| 232 |
-
["./examples/2256_jpg.rf.3afd7903eaf3f3c5aa8da4bbb928bc19.jpg", "detect brain tumor"],
|
| 233 |
["./examples/2871_jpg.rf.3b6eadfbb369abc2b3bcb52b406b74f2.jpg", "detect brain tumor"],
|
| 234 |
["./examples/2921_jpg.rf.3b952f91f27a6248091e7601c22323ad.jpg", "detect brain tumor"],
|
| 235 |
]
|
|
@@ -254,23 +246,19 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
| 254 |
with gr.Row():
|
| 255 |
with gr.Column():
|
| 256 |
image = gr.Image(type="numpy")
|
| 257 |
-
seg_input = gr.Text(label="Entities to Segment/Detect
|
| 258 |
|
| 259 |
with gr.Column():
|
| 260 |
annotated_image = gr.AnnotatedImage(label="Output")
|
| 261 |
|
| 262 |
seg_btn = gr.Button("Submit")
|
| 263 |
examples = [
|
| 264 |
-
["./examples/BloodImage_00099_jpg.rf.0a65e56401cdd71253e7bc04917c3558.jpg", ""],
|
| 265 |
-
["./examples/15_242_212_25_25_jpg.rf.f6bbadf4260dd2c1f5b4ace1b09b0a1b.jpg", ""],
|
| 266 |
-
["./examples/194_jpg.rf.3e3dd592d034bb5ee27a978553819f42.jpg", ""],
|
| 267 |
-
["./examples/239_jpg.rf.3dcc0799277fb78a2ab21db7761ccaeb.jpg", ""],
|
| 268 |
-
["./examples/
|
| 269 |
-
["./examples/
|
| 270 |
-
["./examples/1550_jpg.rf.3d067be9580ec32dbee5a89c675d8459.jpg", ""],
|
| 271 |
-
["./examples/2256_jpg.rf.3afd7903eaf3f3c5aa8da4bbb928bc19.jpg", ""],
|
| 272 |
-
["./examples/2871_jpg.rf.3b6eadfbb369abc2b3bcb52b406b74f2.jpg", ""],
|
| 273 |
-
["./examples/2921_jpg.rf.3b952f91f27a6248091e7601c22323ad.jpg", ""],
|
| 274 |
]
|
| 275 |
gr.Examples(
|
| 276 |
examples=examples,
|
|
|
|
| 176 |
with gr.Row():
|
| 177 |
with gr.Column():
|
| 178 |
image = gr.Image(type="numpy")
|
| 179 |
+
seg_input = gr.Text(label="Entities to Segment/Detect")
|
| 180 |
|
| 181 |
with gr.Column():
|
| 182 |
annotated_image = gr.AnnotatedImage(label="Output")
|
|
|
|
| 187 |
["./examples/15_242_212_25_25_jpg.rf.f6bbadf4260dd2c1f5b4ace1b09b0a1b.jpg", "detect liver disease"],
|
| 188 |
["./examples/194_jpg.rf.3e3dd592d034bb5ee27a978553819f42.jpg", "detect brain tumor"],
|
| 189 |
["./examples/239_jpg.rf.3dcc0799277fb78a2ab21db7761ccaeb.jpg", "detect brain tumor"],
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
["./examples/2871_jpg.rf.3b6eadfbb369abc2b3bcb52b406b74f2.jpg", "detect brain tumor"],
|
| 191 |
["./examples/2921_jpg.rf.3b952f91f27a6248091e7601c22323ad.jpg", "detect brain tumor"],
|
| 192 |
]
|
|
|
|
| 211 |
with gr.Row():
|
| 212 |
with gr.Column():
|
| 213 |
image = gr.Image(type="numpy")
|
| 214 |
+
seg_input = gr.Text(label="Entities to Segment/Detect")
|
| 215 |
|
| 216 |
with gr.Column():
|
| 217 |
annotated_image = gr.AnnotatedImage(label="Output")
|
|
|
|
| 222 |
["./examples/15_242_212_25_25_jpg.rf.f6bbadf4260dd2c1f5b4ace1b09b0a1b.jpg", "detect liver disease"],
|
| 223 |
["./examples/194_jpg.rf.3e3dd592d034bb5ee27a978553819f42.jpg", "detect brain tumor"],
|
| 224 |
["./examples/239_jpg.rf.3dcc0799277fb78a2ab21db7761ccaeb.jpg", "detect brain tumor"],
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
["./examples/2871_jpg.rf.3b6eadfbb369abc2b3bcb52b406b74f2.jpg", "detect brain tumor"],
|
| 226 |
["./examples/2921_jpg.rf.3b952f91f27a6248091e7601c22323ad.jpg", "detect brain tumor"],
|
| 227 |
]
|
|
|
|
| 246 |
with gr.Row():
|
| 247 |
with gr.Column():
|
| 248 |
image = gr.Image(type="numpy")
|
| 249 |
+
seg_input = gr.Text(label="Entities to Segment/Detect")
|
| 250 |
|
| 251 |
with gr.Column():
|
| 252 |
annotated_image = gr.AnnotatedImage(label="Output")
|
| 253 |
|
| 254 |
seg_btn = gr.Button("Submit")
|
| 255 |
examples = [
|
| 256 |
+
["./examples/BloodImage_00099_jpg.rf.0a65e56401cdd71253e7bc04917c3558.jpg", "<OD>"],
|
| 257 |
+
["./examples/15_242_212_25_25_jpg.rf.f6bbadf4260dd2c1f5b4ace1b09b0a1b.jpg", "<OD>"],
|
| 258 |
+
["./examples/194_jpg.rf.3e3dd592d034bb5ee27a978553819f42.jpg", "<OD>"],
|
| 259 |
+
["./examples/239_jpg.rf.3dcc0799277fb78a2ab21db7761ccaeb.jpg", "<OD>"],
|
| 260 |
+
["./examples/2871_jpg.rf.3b6eadfbb369abc2b3bcb52b406b74f2.jpg", "<OD>"],
|
| 261 |
+
["./examples/2921_jpg.rf.3b952f91f27a6248091e7601c22323ad.jpg", "<OD>"],
|
|
|
|
|
|
|
|
|
|
|
|
|
| 262 |
]
|
| 263 |
gr.Examples(
|
| 264 |
examples=examples,
|