M17idd commited on
Commit
a7c1563
·
verified ·
1 Parent(s): 9ebd8d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -51,7 +51,6 @@ def build_pdf_index():
51
  return documents, embeddings
52
 
53
  # ----------------- ساختن Index از PDF -----------------
54
- documents, embeddings = build_pdf_index()
55
 
56
  # ----------------- تعریف LLM از Groq -----------------
57
  groq_api_key = "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"
@@ -67,6 +66,7 @@ llm = GroqLLM(api_key=groq_api_key, model_name="deepseek-r1-distill-llama-70b")
67
  # ----------------- ساخت SimpleRetriever -----------------
68
  class SimpleRetriever(BaseRetriever):
69
  def __init__(self, documents, embeddings):
 
70
  self.documents = documents
71
  self.embeddings = embeddings
72
 
 
51
  return documents, embeddings
52
 
53
  # ----------------- ساختن Index از PDF -----------------
 
54
 
55
  # ----------------- تعریف LLM از Groq -----------------
56
  groq_api_key = "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"
 
66
  # ----------------- ساخت SimpleRetriever -----------------
67
  class SimpleRetriever(BaseRetriever):
68
  def __init__(self, documents, embeddings):
69
+ documents, embeddings = build_pdf_index()
70
  self.documents = documents
71
  self.embeddings = embeddings
72