NaimaAqeel commited on
Commit
b7ba413
·
verified ·
1 Parent(s): f01a813

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -108,9 +108,9 @@ def upload_document(file):
108
  return "Document uploaded and indexed successfully."
109
 
110
  # ===============================
111
- # GENERATION PIPELINE (FLAN-T5)
112
  # ===============================
113
- qa_pipeline = pipeline("text2text-generation", model="google/flan-t5-base")
114
 
115
  def generate_answer_from_file(query, top_k=10):
116
  if not document_texts:
 
108
  return "Document uploaded and indexed successfully."
109
 
110
  # ===============================
111
+ # GENERATION PIPELINE
112
  # ===============================
113
+ query_vector = get_embeddings(query, is_query=True).astype("float32")
114
 
115
  def generate_answer_from_file(query, top_k=10):
116
  if not document_texts: