Cheselle commited on
Commit
80a9356
·
verified ·
1 Parent(s): 4a36e50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -47,12 +47,19 @@ 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
- ai_framework_text = ai_framework_document.get_text("text")
51
- ai_blueprint_text = ai_blueprint_document.get_text("text")
 
 
 
 
 
 
 
52
 
53
  from sentence_transformers import SentenceTransformer
54
  embedding_model = SentenceTransformer("Cheselle/finetuned-arctic-sentence")
55
- embeddings = embedding_model.encode(ai_framework_text + ai_blueprint_text)
56
  #embeddings = embedding_model.encode(ai_framework_document + ai_blueprint_document)
57
 
58
  vectorstore = Qdrant.from_documents(
 
47
  #embeddings = AutoModel.from_pretrained("Cheselle/finetuned-arctic-sentence")
48
  #tokenizer = AutoTokenizer.from_pretrained("Cheselle/finetuned-arctic-sentence")
49
 
50
+ # Assuming ai_framework_document is a list of documents or pages
51
+ ai_framework_text = "".join([doc.get_text("text") for doc in ai_framework_document])
52
+
53
+ # Similarly for ai_blueprint_document
54
+ ai_blueprint_text = "".join([doc.get_text("text") 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
  from sentence_transformers import SentenceTransformer
61
  embedding_model = SentenceTransformer("Cheselle/finetuned-arctic-sentence")
62
+ #embeddings = embedding_model.encode(ai_framework_text + ai_blueprint_text)
63
  #embeddings = embedding_model.encode(ai_framework_document + ai_blueprint_document)
64
 
65
  vectorstore = Qdrant.from_documents(