hujin0929 commited on
Commit
9165ea9
1 Parent(s): 2bd0b92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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="/root/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("/root/llamaindex_demo/data").load_data()
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