Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,12 +56,16 @@ def query_pdf_data(collection, query, retriever_model):
|
|
56 |
query_texts=[query],
|
57 |
n_results=3
|
58 |
)
|
|
|
59 |
context = " ".join([doc for doc in results["documents"][0]])
|
60 |
answer = retriever_model(f"Context: {context}\nQuestion: {query}")
|
61 |
return answer, results["metadatas"]
|
62 |
|
63 |
# Streamlit Interface
|
64 |
def main():
|
|
|
|
|
|
|
65 |
st.title("PDF Chatbot with Retrieval-Augmented Generation")
|
66 |
st.write("Upload a PDF, and ask questions about its content!")
|
67 |
|
|
|
56 |
query_texts=[query],
|
57 |
n_results=3
|
58 |
)
|
59 |
+
|
60 |
context = " ".join([doc for doc in results["documents"][0]])
|
61 |
answer = retriever_model(f"Context: {context}\nQuestion: {query}")
|
62 |
return answer, results["metadatas"]
|
63 |
|
64 |
# Streamlit Interface
|
65 |
def main():
|
66 |
+
image = Image.open('LOGO.PNG')
|
67 |
+
st.image(
|
68 |
+
image, width=250)
|
69 |
st.title("PDF Chatbot with Retrieval-Augmented Generation")
|
70 |
st.write("Upload a PDF, and ask questions about its content!")
|
71 |
|