Docfile commited on
Commit
617e84e
·
verified ·
1 Parent(s): bebd600

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -25,6 +25,8 @@ from llama_index.core import (
25
  from llama_index.embeddings.gemini import GeminiEmbedding
26
  import g4f
27
  g4f.debug.logging = True
 
 
28
 
29
 
30
  llm= LLM = G4FLLM(
@@ -40,6 +42,7 @@ model_name = "models/embedding-001"
40
  embed_model = GeminiEmbedding(
41
  model_name=model_name, api_key=GOOGLE_API_KEY, title="this is a document"
42
  )
 
43
  # Reads pdfs at "./" path
44
  documents = (
45
  SimpleDirectoryReader(
 
25
  from llama_index.embeddings.gemini import GeminiEmbedding
26
  import g4f
27
  g4f.debug.logging = True
28
+ from llama_index.core import Settings
29
+
30
 
31
 
32
  llm= LLM = G4FLLM(
 
42
  embed_model = GeminiEmbedding(
43
  model_name=model_name, api_key=GOOGLE_API_KEY, title="this is a document"
44
  )
45
+ Settings.embed_model = embed_model
46
  # Reads pdfs at "./" path
47
  documents = (
48
  SimpleDirectoryReader(