Spaces:
Running
Sample image return
This PR adds various updates tested in a duplicated space:
Adds a note in the app footer with links to TreeOfLife-10M and the BioCLIP model and GitHub repos to learn more about BioCLIP development.
Updates the demo to return a sample image of the predicted taxon from the EOL portion of TreeOfLife-10M.
- When taxon is higher than species, it will return a random sample from all available sample images of that taxonomic level (i.e., if kingdom is chosen and it predicts Plantae, any plant in the dataset may be returned).
Redesigns the layout of the app for Open-Ended Classification:
- Open-ended and Zero-shot each have a tab; the Zero-shot tab is not changed, but the Open-ended tab now has both an image upload panel and a sample image panel (size of the panels has an upper-bound so users don't have to scroll when uploading a larger image).
- Text is printed under the sample image panel with direction to the associated EOL page for the predicted taxon.
Note: Data is taken from
components/metadata.csv
. If a rank higher than 'species' is selected for prediction, but the EOL page ID for that exact taxon is not found in the examples (with all blank lower ranks), an example with a more specific set of lower ranks within the predicted taxon is shared, which corresponds with the sample image.
For example, an exact match between predicted taxon and sample from components/metadata.csv
for an image where "Family" is the chosen rank:
Check out the EOL entry for Fungi Ascomycota Pezizomycetes Pezizales Sarcoscyphaceae to learn more: https://eol.org/pages/6073.
For the same image where "Order" is the chosen rank:
Check out an example EOL entry within Fungi Ascomycota Pezizomycetes Pezizales to learn more: Fungi Ascomycota Pezizomycetes Pezizales Chorioactidaceae Chorioactis geaster https://eol.org/pages/10656193.
Since "Fungi Ascomycota Pezizomycetes Pezizales __ __ __"is not part of components/metadata.csv
(blank Family, Genus, Species; i.e. no exact EOL Page ID for Pezizales).
@thompsonmj , please review.
Tested and working with new functionality 👍