Update app.py
Browse files
app.py
CHANGED
|
@@ -250,26 +250,22 @@ with gr.Blocks() as demo:
|
|
| 250 |
allow_flagging="never"
|
| 251 |
)
|
| 252 |
|
| 253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
|
| 255 |
-
gr.Examples(
|
| 256 |
-
examples = [
|
| 257 |
-
["images/NORMAL.jpeg", "NORMAL"],
|
| 258 |
-
["images/VIRAL.jpeg", "VIRAL"],
|
| 259 |
-
["images/BACT.jpeg", "BACTERIAL"],
|
| 260 |
-
],
|
| 261 |
-
inputs=[Image, Label],
|
| 262 |
-
label="Try examples",
|
| 263 |
-
)
|
| 264 |
-
# gr.Dataset(
|
| 265 |
-
# samples=example_samples,
|
| 266 |
-
# components=[
|
| 267 |
-
# gr.Markdown(label="True Label")
|
| 268 |
-
# ],
|
| 269 |
-
# headers=["Image", "Label"],
|
| 270 |
-
# label="Test Samples",
|
| 271 |
-
# layout="table"
|
| 272 |
-
# )
|
| 273 |
|
| 274 |
if __name__ == "__main__":
|
| 275 |
demo.launch(share=False)
|
|
|
|
| 250 |
allow_flagging="never"
|
| 251 |
)
|
| 252 |
|
| 253 |
+
example_samples = [
|
| 254 |
+
["images/NORMAL.jpeg", "NORMAL"],
|
| 255 |
+
["images/VIRAL.jpeg", "VIRAL"],
|
| 256 |
+
["images/BACT.jpeg", "BACTERIAL"],
|
| 257 |
+
]
|
| 258 |
+
gr.Dataset(
|
| 259 |
+
samples=example_samples,
|
| 260 |
+
components=[
|
| 261 |
+
gr.Image(type="filepath", label="Image", interactive=False),
|
| 262 |
+
gr.Markdown(label="True Label")
|
| 263 |
+
],
|
| 264 |
+
headers=["Image", "Label"],
|
| 265 |
+
label="Test Samples",
|
| 266 |
+
layout="table"
|
| 267 |
+
)
|
| 268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
|
| 270 |
if __name__ == "__main__":
|
| 271 |
demo.launch(share=False)
|