Spaces:
Sleeping
Sleeping
KushwanthK
commited on
Upload app.py
Browse files
app.py
CHANGED
@@ -490,13 +490,15 @@ def display_highlighted_pdf():
|
|
490 |
sources = [7,8]
|
491 |
response_text = "I offer my respectful obeisances unto the lotus feet of my spiritual master and unto the feet of all Vaiñëavas. I offer my respectful"
|
492 |
|
493 |
-
|
494 |
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
|
|
|
|
500 |
|
501 |
|
502 |
display_highlighted_pdf()
|
|
|
490 |
sources = [7,8]
|
491 |
response_text = "I offer my respectful obeisances unto the lotus feet of my spiritual master and unto the feet of all Vaiñëavas. I offer my respectful"
|
492 |
|
493 |
+
highlighted_pdf_path = highlight_pdf(file_path=file_path, text_to_highlight=response_text, page_numbers=sources)
|
494 |
|
495 |
+
print(highlighted_pdf_path)
|
496 |
+
|
497 |
+
with open(highlighted_pdf_path, "rb") as file:
|
498 |
+
pdf_bytes = file.read()
|
499 |
+
|
500 |
+
# Use pdf_viewer to display the PDF in Streamlit
|
501 |
+
pdf_viewer(pdf_bytes, width=700)
|
502 |
|
503 |
|
504 |
display_highlighted_pdf()
|