Spaces:
Runtime error
Runtime error
update examples
Browse files
app.py
CHANGED
@@ -182,14 +182,17 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
182 |
annotated_image = gr.AnnotatedImage(label="Output")
|
183 |
|
184 |
seg_btn = gr.Button("Submit")
|
185 |
-
examples = [
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
193 |
]
|
194 |
gr.Examples(
|
195 |
examples=examples,
|
@@ -218,14 +221,17 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
218 |
annotated_image = gr.AnnotatedImage(label="Output")
|
219 |
|
220 |
seg_btn = gr.Button("Submit")
|
221 |
-
examples = [
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
|
|
|
|
|
|
229 |
]
|
230 |
gr.Examples(
|
231 |
examples=examples,
|
@@ -254,14 +260,17 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
254 |
annotated_image = gr.AnnotatedImage(label="Output")
|
255 |
|
256 |
seg_btn = gr.Button("Submit")
|
257 |
-
examples = [
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
|
|
|
|
|
|
265 |
]
|
266 |
gr.Examples(
|
267 |
examples=examples,
|
@@ -297,9 +306,9 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
297 |
],
|
298 |
inputs=model_name_input
|
299 |
)
|
|
|
300 |
model_output = gr.Textbox(label="Model Architecture", lines=20, placeholder="Model architecture will appear here...", show_copy_button=True)
|
301 |
error_output = gr.Textbox(label="Error", lines=10, placeholder="Exceptions will appear here...", show_copy_button=True)
|
302 |
-
model_submit_button = gr.Button("Submit")
|
303 |
model_submit_button.click(fn=handle_model_summary, inputs=model_name_input, outputs=[model_output, error_output])
|
304 |
|
305 |
if __name__ == "__main__":
|
|
|
182 |
annotated_image = gr.AnnotatedImage(label="Output")
|
183 |
|
184 |
seg_btn = gr.Button("Submit")
|
185 |
+
examples = [
|
186 |
+
["./examples/BloodImage_00099_jpg.rf.0a65e56401cdd71253e7bc04917c3558.jpg", "detect WBC"],
|
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 |
]
|
197 |
gr.Examples(
|
198 |
examples=examples,
|
|
|
221 |
annotated_image = gr.AnnotatedImage(label="Output")
|
222 |
|
223 |
seg_btn = gr.Button("Submit")
|
224 |
+
examples = [
|
225 |
+
["./examples/BloodImage_00099_jpg.rf.0a65e56401cdd71253e7bc04917c3558.jpg", "detect WBC"],
|
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 |
]
|
236 |
gr.Examples(
|
237 |
examples=examples,
|
|
|
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/1385_jpg.rf.3c67cb92e2922dba0e6dba86f69df40b.jpg", ""],
|
269 |
+
["./examples/1491_jpg.rf.3c658e83538de0fa5a3f4e13d7d85f12.jpg", ""],
|
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,
|
|
|
306 |
],
|
307 |
inputs=model_name_input
|
308 |
)
|
309 |
+
model_submit_button = gr.Button("Submit")
|
310 |
model_output = gr.Textbox(label="Model Architecture", lines=20, placeholder="Model architecture will appear here...", show_copy_button=True)
|
311 |
error_output = gr.Textbox(label="Error", lines=10, placeholder="Exceptions will appear here...", show_copy_button=True)
|
|
|
312 |
model_submit_button.click(fn=handle_model_summary, inputs=model_name_input, outputs=[model_output, error_output])
|
313 |
|
314 |
if __name__ == "__main__":
|