Docfile commited on
Commit
11fcf8f
Β·
verified Β·
1 Parent(s): 82e3417

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -3,7 +3,7 @@ import streamlit as st
3
  from llama_index.llms.gemini import Gemini
4
  from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, Settings
5
  import os
6
-
7
  #os.environ["GOOGLE_API_KEY"] = GOOGLE_API_KEY
8
 
9
  st.set_page_config(page_title="Chat with the Streamlit docs, powered by LlamaIndex", page_icon="πŸ¦™", layout="centered", initial_sidebar_state="auto", menu_items=None)
@@ -34,6 +34,10 @@ def load_data():
34
  your answers technical and based on
35
  facts – do not hallucinate features.""",
36
  )
 
 
 
 
37
  index = VectorStoreIndex.from_documents(docs)
38
  return index
39
 
 
3
  from llama_index.llms.gemini import Gemini
4
  from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, Settings
5
  import os
6
+ from llama_index.embeddings.gemini import GeminiEmbedding
7
  #os.environ["GOOGLE_API_KEY"] = GOOGLE_API_KEY
8
 
9
  st.set_page_config(page_title="Chat with the Streamlit docs, powered by LlamaIndex", page_icon="πŸ¦™", layout="centered", initial_sidebar_state="auto", menu_items=None)
 
34
  your answers technical and based on
35
  facts – do not hallucinate features.""",
36
  )
37
+ Settings.embed_model = GeminiEmbedding(
38
+ model="models/embedding-001", embed_batch_size=100
39
+ )
40
+
41
  index = VectorStoreIndex.from_documents(docs)
42
  return index
43