Add default examples for the Inference API

Hi there,

I recently fine-tuned a model and add it to the Hub.
My model is BERT based with a classification head used for sentiment analysis.
I’m wondering how to set-up default examples to be selected by users. The Hub has already set an example in english but my model uses Arabic language.
Here you can find my model.

Thanks

1 Like

UPDATE:
I found the answer in another model README.md
Apparently, I had to add in the top of my README.md the following text:

---
language: ar        # <-- my language
widget:
 - text: "my example goes here in the requested language"
---

Hope this helps other beginners too :slight_smile: and would be awesome if someone put the link to the doc that discusses this issue.

2 Likes