Skip to content

Conversation

mattdangerw
Copy link
Member

@mattdangerw mattdangerw commented Dec 3, 2024

A request from huggingface, adds supported tasks to the metadata.json file for a saved preset. This is to improve the sample code generation for KerasHub models.

An SD3 model will have ['TextToImage', 'Inpaint', 'ImageToImage'], a BERT model ['TextClassifier', 'MaskedLM'], etc.

Copy link
Member

@SamanehSaadat SamanehSaadat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Matt!

@Wauplin
Copy link
Contributor

Wauplin commented Dec 3, 2024

Thanks a ton! 🤗 ❤️

@mattdangerw mattdangerw merged commit b30ecfb into keras-team:master Dec 7, 2024
9 of 10 checks passed
Wauplin added a commit to huggingface/huggingface.js that referenced this pull request Jan 23, 2025
This PR updates the `keras-hub` snippets based on the new `metadata.json
> tasks` field. This field is now uploaded for all KerasHub models (see
keras-team/keras-hub#1997) and contains the list
of tasks compatible for a given model. This allows us to generate
multiple snippets when relevant. For instance,
[keras/stable_diffusion_3.5_large_turbo](https://huggingface.co/keras/stable_diffusion_3.5_large_turbo/blob/main/metadata.json)
is compatible with `ImageToImage`, `Inpaint` and `TextToImage` tasks.

For this PR to work, we'll need to parse the metadata.json file
server-side. This is done in
huggingface-internal/moon-landing#11693 (private
PR). We can merge these 2 PRs independently.

cc @martin-gorner @mattdangerw @SamanehSaadat who coordinated this 

---

**Note:** I also removed the legacy `keras-nlp` library (only [18
remaining models](https://huggingface.co/models?library=keras-nlp)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants