Commit
·
0bd8e1d
1
Parent(s):
19b41d0
add more examples
Browse files
app.py
CHANGED
@@ -84,12 +84,6 @@ def _predict(inputs):
|
|
84 |
predicted_images.append((str(image_url), f"Confidence: {top_pred['score']}, \n image url: {image_url}"))
|
85 |
|
86 |
return predicted_images
|
87 |
-
# for image in images:
|
88 |
-
|
89 |
-
# top_pred = classif_pipeline(image, top_k=1)[0]
|
90 |
-
# if top_pred['label'] == 'illustrated':
|
91 |
-
# predicted_images.append((image, top_pred['score']))
|
92 |
-
# return predicted_images
|
93 |
|
94 |
|
95 |
gallery = gr.Gallery()
|
@@ -101,6 +95,7 @@ demo = gr.Interface(
|
|
101 |
outputs=gallery,
|
102 |
title="ImageIN",
|
103 |
description="Identify illustrations in pages of historical books!",
|
104 |
-
examples=['https://iiif.lib.harvard.edu/manifests/drs:427603172'
|
|
|
105 |
)
|
106 |
demo.launch(debug=True)
|
|
|
84 |
predicted_images.append((str(image_url), f"Confidence: {top_pred['score']}, \n image url: {image_url}"))
|
85 |
|
86 |
return predicted_images
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
|
89 |
gallery = gr.Gallery()
|
|
|
95 |
outputs=gallery,
|
96 |
title="ImageIN",
|
97 |
description="Identify illustrations in pages of historical books!",
|
98 |
+
examples=['https://iiif.lib.harvard.edu/manifests/drs:427603172',
|
99 |
+
"https://iiif.lib.harvard.edu/manifests/drs:427342693","https://iiif.archivelab.org/iiif/holylandbiblebok0000cunn/manifest.json"]
|
100 |
)
|
101 |
demo.launch(debug=True)
|