Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -154,7 +154,6 @@ def retrieve_and_query(query, retriever_engine):
|
|
| 154 |
return response, retrieved_image_path_list
|
| 155 |
|
| 156 |
def process_pdf(pdf_file):
|
| 157 |
-
# import pdb; pdb.set_trace()
|
| 158 |
temp_dir = tempfile.TemporaryDirectory()
|
| 159 |
temp_pdf_path = os.path.join(temp_dir.name, pdf_file.name)
|
| 160 |
with open(temp_pdf_path, "wb") as f:
|
|
@@ -204,10 +203,8 @@ def main():
|
|
| 204 |
if st.button("Ask Question"):
|
| 205 |
print("running")
|
| 206 |
try:
|
| 207 |
-
import pdb; pdb.set_trace()
|
| 208 |
|
| 209 |
with st.spinner("Retrieving information..."):
|
| 210 |
-
import pdb; pdb.set_trace()
|
| 211 |
response, retrieved_image_path_list = retrieve_and_query(query, st.session_state.retriever_engine)
|
| 212 |
|
| 213 |
st.write("Retrieved Context:")
|
|
|
|
| 154 |
return response, retrieved_image_path_list
|
| 155 |
|
| 156 |
def process_pdf(pdf_file):
|
|
|
|
| 157 |
temp_dir = tempfile.TemporaryDirectory()
|
| 158 |
temp_pdf_path = os.path.join(temp_dir.name, pdf_file.name)
|
| 159 |
with open(temp_pdf_path, "wb") as f:
|
|
|
|
| 203 |
if st.button("Ask Question"):
|
| 204 |
print("running")
|
| 205 |
try:
|
|
|
|
| 206 |
|
| 207 |
with st.spinner("Retrieving information..."):
|
|
|
|
| 208 |
response, retrieved_image_path_list = retrieve_and_query(query, st.session_state.retriever_engine)
|
| 209 |
|
| 210 |
st.write("Retrieved Context:")
|