Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,7 @@ from llama_index.multi_modal_llms.openai import OpenAIMultiModal
|
|
19 |
|
20 |
embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
|
21 |
chat_llm = ChatOpenAI(temperature = 0.5, model = 'gpt-4o')
|
|
|
22 |
|
23 |
contextualize_q_system_prompt = """Given a chat history and the latest user question \
|
24 |
which might reference context in the chat history, formulate a standalone question \
|
@@ -52,7 +53,6 @@ pg_connection = f"postgresql+psycopg://postgres:{pg_password}@{aws_ec2_ip}:5432/
|
|
52 |
qd_client = qdrant_client.QdrantClient(path="qdrant_db")
|
53 |
image_store = QdrantVectorStore(client=qd_client, collection_name="image_collection")
|
54 |
storage_context = StorageContext.from_defaults(image_store=image_store)
|
55 |
-
openai_mm_llm = OpenAIMultiModal(model="gpt-4-vision-preview", max_new_tokens=1500)
|
56 |
|
57 |
def response(message, history, doc_label):
|
58 |
|
@@ -110,4 +110,4 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
|
|
110 |
button = gr.Button(value="Retrieve images")
|
111 |
button.click(img_retrieve, [query, doc_label], gallery)
|
112 |
|
113 |
-
demo.launch(
|
|
|
19 |
|
20 |
embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
|
21 |
chat_llm = ChatOpenAI(temperature = 0.5, model = 'gpt-4o')
|
22 |
+
openai_mm_llm = OpenAIMultiModal(model="gpt-4-vision-preview", max_new_tokens=1500)
|
23 |
|
24 |
contextualize_q_system_prompt = """Given a chat history and the latest user question \
|
25 |
which might reference context in the chat history, formulate a standalone question \
|
|
|
53 |
qd_client = qdrant_client.QdrantClient(path="qdrant_db")
|
54 |
image_store = QdrantVectorStore(client=qd_client, collection_name="image_collection")
|
55 |
storage_context = StorageContext.from_defaults(image_store=image_store)
|
|
|
56 |
|
57 |
def response(message, history, doc_label):
|
58 |
|
|
|
110 |
button = gr.Button(value="Retrieve images")
|
111 |
button.click(img_retrieve, [query, doc_label], gallery)
|
112 |
|
113 |
+
demo.launch()
|