Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,10 @@ logging.basicConfig(level=logging.INFO)
|
|
12 |
logger = logging.getLogger(__name__)
|
13 |
|
14 |
client = Groq(api_key="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")
|
15 |
-
embedding_model = HuggingFaceEmbeddings(model_name="heydariAI/persian-embeddings")
|
16 |
|
17 |
-
|
|
|
|
|
18 |
|
19 |
def process_pdf_with_langchain(pdf_path):
|
20 |
try:
|
|
|
12 |
logger = logging.getLogger(__name__)
|
13 |
|
14 |
client = Groq(api_key="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")
|
|
|
15 |
|
16 |
+
|
17 |
+
embeddings = HuggingFaceEmbeddings(model_name="heydariAI/persian-embeddings")
|
18 |
+
vector_store = InMemoryVectorStore(embeddings)
|
19 |
|
20 |
def process_pdf_with_langchain(pdf_path):
|
21 |
try:
|