Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -47,16 +47,17 @@ combined_documents = recursive_framework_document + recursive_blueprint_document
|
|
47 |
#embeddings = AutoModel.from_pretrained("Cheselle/finetuned-arctic-sentence")
|
48 |
#tokenizer = AutoTokenizer.from_pretrained("Cheselle/finetuned-arctic-sentence")
|
49 |
|
50 |
-
# Assuming ai_framework_document
|
51 |
-
ai_framework_text = "".join([doc.
|
52 |
|
53 |
# Similarly for ai_blueprint_document
|
54 |
-
ai_blueprint_text = "".join([doc.
|
55 |
|
56 |
# Now you can use these text variables
|
57 |
embeddings = embedding_model.encode(ai_framework_text + ai_blueprint_text)
|
58 |
|
59 |
|
|
|
60 |
from sentence_transformers import SentenceTransformer
|
61 |
embedding_model = SentenceTransformer("Cheselle/finetuned-arctic-sentence")
|
62 |
#embeddings = embedding_model.encode(ai_framework_text + ai_blueprint_text)
|
|
|
47 |
#embeddings = AutoModel.from_pretrained("Cheselle/finetuned-arctic-sentence")
|
48 |
#tokenizer = AutoTokenizer.from_pretrained("Cheselle/finetuned-arctic-sentence")
|
49 |
|
50 |
+
# Assuming ai_framework_document and ai_blueprint_document are lists of langchain_core.documents.Document
|
51 |
+
ai_framework_text = "".join([doc.page_content for doc in ai_framework_document])
|
52 |
|
53 |
# Similarly for ai_blueprint_document
|
54 |
+
ai_blueprint_text = "".join([doc.page_content for doc in ai_blueprint_document])
|
55 |
|
56 |
# Now you can use these text variables
|
57 |
embeddings = embedding_model.encode(ai_framework_text + ai_blueprint_text)
|
58 |
|
59 |
|
60 |
+
|
61 |
from sentence_transformers import SentenceTransformer
|
62 |
embedding_model = SentenceTransformer("Cheselle/finetuned-arctic-sentence")
|
63 |
#embeddings = embedding_model.encode(ai_framework_text + ai_blueprint_text)
|