Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -492,22 +492,20 @@ with st.sidebar:
|
|
| 492 |
st.title("About")
|
| 493 |
st.markdown(
|
| 494 |
"""
|
| 495 |
-
This app
|
| 496 |
-
It allows users to upload documents, generate summaries, ask questions, and create podcasts.
|
| 497 |
"""
|
| 498 |
)
|
| 499 |
st.markdown("### Steps:")
|
| 500 |
st.markdown("1. Upload documents.")
|
| 501 |
st.markdown("2. Generate summary.")
|
| 502 |
st.markdown("3. Ask questions.")
|
|
|
|
| 503 |
st.markdown("4. Create podcast.")
|
| 504 |
|
| 505 |
-
st.markdown("### Credits:")
|
| 506 |
-
st.markdown("Image Source: [Geeksforgeeks](https://www.geeksforgeeks.org/how-to-convert-document-into-podcast/)")
|
| 507 |
|
| 508 |
# Streamlit UI
|
| 509 |
-
st.title("
|
| 510 |
-
st.image("./
|
| 511 |
|
| 512 |
# Embedding model selector (main screen)
|
| 513 |
st.subheader("Embedding Model Selection")
|
|
@@ -553,32 +551,6 @@ if st.button("Generate Summary"):
|
|
| 553 |
st.text_area("Document Summary", summary, height=250)
|
| 554 |
st.success("Summary generated successfully!")
|
| 555 |
|
| 556 |
-
# Automatically generate Mind Map after summary
|
| 557 |
-
st.markdown("### π§ Mind Map of the Summary")
|
| 558 |
-
|
| 559 |
-
mindmap_prompt = f"""
|
| 560 |
-
A hand-drawn colorful mind map diagram, educational style, clear hierarchy.
|
| 561 |
-
Language: {summary_language}
|
| 562 |
-
Topic: Research Summary
|
| 563 |
-
βββ ABSTRACT
|
| 564 |
-
βββ CONTRIBUTIONS
|
| 565 |
-
βββ RESULTS
|
| 566 |
-
βββ CONCLUSION
|
| 567 |
-
βββ LIMITATIONS
|
| 568 |
-
βββ FUTURE WORK
|
| 569 |
-
"""
|
| 570 |
-
|
| 571 |
-
mindmap_image, _ = infer(
|
| 572 |
-
prompt=mindmap_prompt,
|
| 573 |
-
seed=42,
|
| 574 |
-
randomize_seed=True,
|
| 575 |
-
width=1024,
|
| 576 |
-
height=1024,
|
| 577 |
-
num_inference_steps=4
|
| 578 |
-
)
|
| 579 |
-
|
| 580 |
-
st.image(mindmap_image, caption="Mind Map Diagram", use_column_width=True)
|
| 581 |
-
|
| 582 |
else:
|
| 583 |
st.error("Failed to generate summary.")
|
| 584 |
else:
|
|
|
|
| 492 |
st.title("About")
|
| 493 |
st.markdown(
|
| 494 |
"""
|
| 495 |
+
This app users to upload documents, generate summaries and stories, ask questions, and create podcasts in multiple languages.
|
|
|
|
| 496 |
"""
|
| 497 |
)
|
| 498 |
st.markdown("### Steps:")
|
| 499 |
st.markdown("1. Upload documents.")
|
| 500 |
st.markdown("2. Generate summary.")
|
| 501 |
st.markdown("3. Ask questions.")
|
| 502 |
+
st.markdown("2. Generate stories.")
|
| 503 |
st.markdown("4. Create podcast.")
|
| 504 |
|
|
|
|
|
|
|
| 505 |
|
| 506 |
# Streamlit UI
|
| 507 |
+
st.title("Knowledge Explorer")
|
| 508 |
+
st.image("./cover_image_1.png", use_container_width=True)
|
| 509 |
|
| 510 |
# Embedding model selector (main screen)
|
| 511 |
st.subheader("Embedding Model Selection")
|
|
|
|
| 551 |
st.text_area("Document Summary", summary, height=250)
|
| 552 |
st.success("Summary generated successfully!")
|
| 553 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 554 |
else:
|
| 555 |
st.error("Failed to generate summary.")
|
| 556 |
else:
|