Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,14 @@ from pydantic import BaseModel, ValidationError
|
|
16 |
from pypdf import PdfReader
|
17 |
from tenacity import retry, retry_if_exception_type
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
# Define multiple sets of instruction templates
|
20 |
INSTRUCTION_TEMPLATES = {
|
21 |
"material discovery summary": {
|
@@ -494,6 +502,10 @@ with gr.Blocks(title="PDF to Audio", css="""
|
|
494 |
outputs=[]
|
495 |
)
|
496 |
|
|
|
|
|
|
|
|
|
497 |
# Enable queueing for better performance
|
498 |
demo.queue(max_size=20, default_concurrency_limit=20)
|
499 |
|
|
|
16 |
from pypdf import PdfReader
|
17 |
from tenacity import retry, retry_if_exception_type
|
18 |
|
19 |
+
def read_readme():
|
20 |
+
readme_path = Path("README.md")
|
21 |
+
if readme_path.exists():
|
22 |
+
with open(readme_path, "r") as file:
|
23 |
+
return file.read()
|
24 |
+
else:
|
25 |
+
return "README.md not found. Please check the repository for more information."
|
26 |
+
|
27 |
# Define multiple sets of instruction templates
|
28 |
INSTRUCTION_TEMPLATES = {
|
29 |
"material discovery summary": {
|
|
|
502 |
outputs=[]
|
503 |
)
|
504 |
|
505 |
+
# Add README content at the bottom
|
506 |
+
gr.Markdown("---") # Horizontal line to separate the interface from README
|
507 |
+
gr.Markdown(read_readme())
|
508 |
+
|
509 |
# Enable queueing for better performance
|
510 |
demo.queue(max_size=20, default_concurrency_limit=20)
|
511 |
|