Sentence Similarity
sentence-transformers
Safetensors
distilbert
feature-extraction
Generated from Trainer
dataset_size:1746
loss:CosineSimilarityLoss
text-embeddings-inference
Instructions to use DivyaMereddy007/RecipeBert_v5original_epoc50_Copy_of_TrainSetenceTransforme-Finetuning_v5_DistilledBert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use DivyaMereddy007/RecipeBert_v5original_epoc50_Copy_of_TrainSetenceTransforme-Finetuning_v5_DistilledBert with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("DivyaMereddy007/RecipeBert_v5original_epoc50_Copy_of_TrainSetenceTransforme-Finetuning_v5_DistilledBert") sentences = [ "Scalloped Corn [\"1 can cream-style corn\", \"1 can whole kernel corn\", \"1/2 pkg. (approximately 20) saltine crackers, crushed\", \"1 egg, beaten\", \"6 tsp. butter, divided\", \"pepper to taste\"] [\"Mix together both cans of corn, crackers, egg, 2 teaspoons of melted butter and pepper and place in a buttered baking dish.\", \"Dot with remaining 4 teaspoons of butter.\", \"Bake at 350\\u00b0 for 1 hour.\"]", "Artichoke Dip [\"2 cans or jars artichoke hearts\", \"1 c. mayonnaise\", \"1 c. Parmesan cheese\"] [\"Drain artichokes and chop.\", \"Mix with mayonnaise and Parmesan cheese.\", \"After well mixed, bake, uncovered, for 20 to 30 minutes at 350\\u00b0.\", \"Serve with crackers.\"]", "Scalloped Corn [\"1 can cream-style corn\", \"1 can whole kernel corn\", \"1/2 pkg. (approximately 20) saltine crackers, crushed\", \"1 egg, beaten\", \"6 tsp. butter, divided\", \"pepper to taste\"] [\"Mix together both cans of corn, crackers, egg, 2 teaspoons of melted butter and pepper and place in a buttered baking dish.\", \"Dot with remaining 4 teaspoons of butter.\", \"Bake at 350\\u00b0 for 1 hour.\"]", "Chicken Stew [\"3 lb. chicken, boiled\", \"4 medium potatoes, diced\", \"2 medium onions, chopped\", \"1 (16 oz.) can creamed corn\", \"1 (16 oz.) can English peas\", \"1 (16 oz.) can field peas\", \"1 (16 oz.) can butter beans\", \"1 (16 oz.) can tomatoes\", \"1 (46 oz.) can tomato juice\", \"1 small box macaroni\", \"1 Tbsp. black pepper\", \"1 Tbsp. salt\", \"1 Tbsp. sugar\"] [\"Remove chicken from bone.\", \"Use the broth.\", \"Mix the vegetables and macaroni.\", \"Add sugar, salt and black pepper.\", \"Cook until all vegetables are tender over medium heat.\"]" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
| [ | |
| { | |
| "idx": 0, | |
| "name": "0", | |
| "path": "", | |
| "type": "sentence_transformers.models.Transformer" | |
| }, | |
| { | |
| "idx": 1, | |
| "name": "1", | |
| "path": "1_Pooling", | |
| "type": "sentence_transformers.models.Pooling" | |
| } | |
| ] |