Update app.py
Browse fileswith ollama local install
app.py
CHANGED
|
@@ -101,12 +101,10 @@ def main() -> None:
|
|
| 101 |
|
| 102 |
raw_text = get_pdf(docs)
|
| 103 |
|
| 104 |
-
#chunks = text_splitter.split_documents(docs)
|
| 105 |
chunks = text_splitter.split_documents(raw_text)
|
| 106 |
|
| 107 |
-
## Mod from nomic-embed-text to nomic-ai/nomic-embed-text-v1.5
|
| 108 |
#embeddings = OllamaEmbeddings(model='nomic-ai/nomic-embed-text-v1.5', base_url="http://localhost:11434")
|
| 109 |
-
embeddings =
|
| 110 |
|
| 111 |
single_vector = embeddings.embed_query("this is some text data")
|
| 112 |
|
|
|
|
| 101 |
|
| 102 |
raw_text = get_pdf(docs)
|
| 103 |
|
|
|
|
| 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://host.docker.internal:11434")
|
| 108 |
|
| 109 |
single_vector = embeddings.embed_query("this is some text data")
|
| 110 |
|