use newer embedding model
Browse files
app.py
CHANGED
@@ -4,8 +4,12 @@ from llama_index.core.indices.query.query_transform.base import (
|
|
4 |
HyDEQueryTransform,
|
5 |
)
|
6 |
from llama_index.core.query_engine import TransformQueryEngine
|
|
|
|
|
7 |
import gradio as gr
|
8 |
|
|
|
|
|
9 |
# dataset=load_dataset("davidr70/megillah_english_sugyot", split="train")
|
10 |
dataset=load_dataset("davidr70/megilla_sugyot_merged", split="train")
|
11 |
documents = [Document(text=item['content'], metadata=item['metadata']) for item in dataset]
|
|
|
4 |
HyDEQueryTransform,
|
5 |
)
|
6 |
from llama_index.core.query_engine import TransformQueryEngine
|
7 |
+
from llama_index.core import Settings
|
8 |
+
from llama_index.embeddings.openai import OpenAIEmbedding
|
9 |
import gradio as gr
|
10 |
|
11 |
+
Settings.embed_model = OpenAIEmbedding(model_name="text-embedding-3-small")
|
12 |
+
|
13 |
# dataset=load_dataset("davidr70/megillah_english_sugyot", split="train")
|
14 |
dataset=load_dataset("davidr70/megilla_sugyot_merged", split="train")
|
15 |
documents = [Document(text=item['content'], metadata=item['metadata']) for item in dataset]
|