Instructions to use alexdseo/RecipeBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alexdseo/RecipeBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="alexdseo/RecipeBERT")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("alexdseo/RecipeBERT") model = AutoModelForMaskedLM.from_pretrained("alexdseo/RecipeBERT") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,7 +32,7 @@ food_data = "Hawaiian Pizza"
|
|
| 32 |
embedding = pipeline(
|
| 33 |
'feature-extraction', model='alexdseo/RecipeBERT', framework='pt'
|
| 34 |
)
|
| 35 |
-
#
|
| 36 |
food_rep = embedding(food_data, return_tensors='pt')[0].numpy().mean(axis=0)
|
| 37 |
|
| 38 |
```
|
|
|
|
| 32 |
embedding = pipeline(
|
| 33 |
'feature-extraction', model='alexdseo/RecipeBERT', framework='pt'
|
| 34 |
)
|
| 35 |
+
# Mean pooling
|
| 36 |
food_rep = embedding(food_data, return_tensors='pt')[0].numpy().mean(axis=0)
|
| 37 |
|
| 38 |
```
|