File size: 524 Bytes
83aabd5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from control import recommendation_handler
import numpy as np
prompt_json, _ = recommendation_handler.populate_json()
prompt = """
Hello how are you?
. """
model_id='sentence-transformers/all-MiniLM-L6-v2'
embedding_fn = recommendation_handler.get_embedding_func(inference='local', model_id=model_id)
print(recommendation_handler.split_into_sentences(prompt))
recommendation_json = recommendation_handler.recommend_prompt(prompt, prompt_json, embedding_fn=embedding_fn, get_xy=True)
print(recommendation_json) |