Update app.py
Browse filesbase url : http://ollama:11434
app.py
CHANGED
@@ -5,8 +5,6 @@ import logging
|
|
5 |
|
6 |
from langchain_ollama import ChatOllama
|
7 |
|
8 |
-
|
9 |
-
from langchain_community.document_loaders import PyMuPDFLoader
|
10 |
from langchain_community.document_loaders import PyPDFLoader
|
11 |
|
12 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
@@ -104,7 +102,7 @@ def main() -> None:
|
|
104 |
chunks = text_splitter.split_documents(raw_text)
|
105 |
|
106 |
#embeddings = OllamaEmbeddings(model='nomic-ai/nomic-embed-text-v1.5', base_url="http://localhost:11434")
|
107 |
-
embeddings = OllamaEmbeddings(model='nomic-embed-text', base_url="http://
|
108 |
|
109 |
single_vector = embeddings.embed_query("this is some text data")
|
110 |
|
|
|
5 |
|
6 |
from langchain_ollama import ChatOllama
|
7 |
|
|
|
|
|
8 |
from langchain_community.document_loaders import PyPDFLoader
|
9 |
|
10 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
|
|
102 |
chunks = text_splitter.split_documents(raw_text)
|
103 |
|
104 |
#embeddings = OllamaEmbeddings(model='nomic-ai/nomic-embed-text-v1.5', base_url="http://localhost:11434")
|
105 |
+
embeddings = OllamaEmbeddings(model='nomic-embed-text', base_url="http://ollama:11434")
|
106 |
|
107 |
single_vector = embeddings.embed_query("this is some text data")
|
108 |
|