RitaRamo / smallcap

SmallCap: Lightweight Image Captioning Prompted with Retrieval Augmentation
88 stars 17 forks source link

Some notes about Transformers integration #17

Open NielsRogge opened 2 months ago

NielsRogge commented 2 months ago

Hi SmallCap team,

Congrats on this work! Niels here from the open-source team at Hugging Face.

It's great to see the model being available on Hugging Face along with a demo: https://huggingface.co/spaces/RitaParadaRamos/SmallCapDemo.

However, I noticed that you register the model everytime you run the code. This is actually not necessary, you just need to register it once, then push the code to the hub and the model then becomes usable through the Transformers library.

We wrote a guide about it here: https://huggingface.co/docs/transformers/custom_models.

Along with that, it'd be great to update the model card to include a code snippet indicating how to run the model.

Let me know if you need any help!

Cheers,

Niels ML Engineer @ HF