Views
No views yet
1from transformers import pipeline
2
3# Your food-related data
4food_data = "Hawaiian Pizza"
5# Use pipeline for feature extraction
6embedding = pipeline(
7 'feature-extraction', model='alexdseo/RecipeBERT', framework='pt'
8 )
9# Mean pooling
10food_rep = embedding(food_data, return_tensors='pt')[0].numpy().mean(axis=0)
11| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.7914 | 1.0 | 13286 | 0.7377 |
| 0.6945 | 2.0 | 26572 | 0.6569 |
| 0.6574 | 3.0 | 39858 | 0.6216 |