Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,14 +26,14 @@ st.title("llama_index_demo")
|
|
26 |
@st.cache_resource
|
27 |
def init_models():
|
28 |
embed_model = HuggingFaceEmbedding(
|
29 |
-
model_name="
|
30 |
)
|
31 |
Settings.embed_model = embed_model
|
32 |
|
33 |
#用初始化llm
|
34 |
Settings.llm = llm
|
35 |
|
36 |
-
documents = SimpleDirectoryReader("
|
37 |
index = VectorStoreIndex.from_documents(documents)
|
38 |
query_engine = index.as_query_engine()
|
39 |
|
|
|
26 |
@st.cache_resource
|
27 |
def init_models():
|
28 |
embed_model = HuggingFaceEmbedding(
|
29 |
+
model_name="model/sentence-transformer/paraphrase-multilingual-MiniLM-L12-v2"
|
30 |
)
|
31 |
Settings.embed_model = embed_model
|
32 |
|
33 |
#用初始化llm
|
34 |
Settings.llm = llm
|
35 |
|
36 |
+
documents = SimpleDirectoryReader("data").load_data()
|
37 |
index = VectorStoreIndex.from_documents(documents)
|
38 |
query_engine = index.as_query_engine()
|
39 |
|