Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,13 @@ from io import BytesIO
|
|
4 |
from PIL import Image
|
5 |
import PyPDF2
|
6 |
from transformers import BlipProcessor, BlipForConditionalGeneration
|
7 |
-
from llama_index import Settings, VectorStoreIndex, SimpleDirectoryReader
|
8 |
from llama_index.embeddings.fastembed import FastEmbedEmbedding
|
9 |
from llama_index.llms.gemini import Gemini
|
|
|
|
|
|
|
|
|
10 |
import streamlit as st
|
11 |
|
12 |
# Configure Google Gemini
|
|
|
4 |
from PIL import Image
|
5 |
import PyPDF2
|
6 |
from transformers import BlipProcessor, BlipForConditionalGeneration
|
7 |
+
from llama_index.core import Settings, VectorStoreIndex, SimpleDirectoryReader
|
8 |
from llama_index.embeddings.fastembed import FastEmbedEmbedding
|
9 |
from llama_index.llms.gemini import Gemini
|
10 |
+
|
11 |
+
# Configure FastEmbed and Google Gemini
|
12 |
+
Settings.embed_model = FastEmbedEmbedding(model_name="BAAI/bge-small-en-v1.5")
|
13 |
+
Settings.llm = Gemini(api_key=os.getenv("GOOGLE_API_KEY"), temperature=0.5, model_name="models/gemini-pro")
|
14 |
import streamlit as st
|
15 |
|
16 |
# Configure Google Gemini
|