Spaces:
Runtime error
Runtime error
Commit
·
6ca41a7
1
Parent(s):
00a3991
Update app.py
Browse files
app.py
CHANGED
@@ -531,6 +531,18 @@ if __name__ == "__main__":
|
|
531 |
placeholder="Enter text to summarize, the text will be cleaned and truncated on Spaces. Narrative, academic (both papers and lecture transcription), and article text work well. May take a bit to generate depending on the input text :)",
|
532 |
)
|
533 |
gr.Markdown("---")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
with gr.Column():
|
535 |
gr.Markdown("## Generate Summary")
|
536 |
with gr.Row():
|
@@ -634,16 +646,16 @@ if __name__ == "__main__":
|
|
634 |
)
|
635 |
with gr.Column():
|
636 |
gr.Markdown("## About")
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
|
648 |
load_examples_button.click(
|
649 |
fn=load_single_example_text, inputs=[example_name], outputs=[input_text]
|
|
|
531 |
placeholder="Enter text to summarize, the text will be cleaned and truncated on Spaces. Narrative, academic (both papers and lecture transcription), and article text work well. May take a bit to generate depending on the input text :)",
|
532 |
)
|
533 |
gr.Markdown("---")
|
534 |
+
gr.Markdown("# Document Summarization with Long-Document Transformers")
|
535 |
+
gr.Markdown(
|
536 |
+
"""An example use case for fine-tuned long document transformers. Model(s) are trained on [book summaries](https://hf.co/datasets/kmfoda/booksum). Architectures [in this demo](https://hf.co/spaces/pszemraj/document-summarization) are [LongT5-base](https://hf.co/pszemraj/long-t5-tglobal-base-16384-book-summary) and [Pegasus-X-Large](https://hf.co/pszemraj/pegasus-x-large-book-summary).
|
537 |
+
|
538 |
+
**Want more performance? Run this demo from a free Google Colab GPU:**.
|
539 |
+
<br>
|
540 |
+
<a href="https://colab.research.google.com/gist/pszemraj/52f67cf7326e780155812a6a1f9bb724/document-summarization-on-gpu.ipynb">
|
541 |
+
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
|
542 |
+
</a>
|
543 |
+
<br>
|
544 |
+
"""
|
545 |
+
)
|
546 |
with gr.Column():
|
547 |
gr.Markdown("## Generate Summary")
|
548 |
with gr.Row():
|
|
|
646 |
)
|
647 |
with gr.Column():
|
648 |
gr.Markdown("## About")
|
649 |
+
gr.Markdown(
|
650 |
+
"- Models are fine-tuned on the [🅱️ookSum dataset](https://arxiv.org/abs/2105.08209). The goal was to create a model that generalizes well and is useful for summarizing text in academic and everyday use."
|
651 |
+
)
|
652 |
+
gr.Markdown(
|
653 |
+
"- _Update April 2023:_ Additional models fine-tuned on the [PLOS](https://hf.co/datasets/pszemraj/scientific_lay_summarisation-plos-norm) and [ELIFE](https://hf.co/datasets/pszemraj/scientific_lay_summarisation-elife-norm) subsets of the [scientific lay summaries](https://arxiv.org/abs/2210.09932) dataset are available (see dropdown at the top)."
|
654 |
+
)
|
655 |
+
gr.Markdown(
|
656 |
+
"Adjust the max input words & max PDF pages for OCR by duplicating this space and [setting the environment variables](https://hf.co/docs/hub/spaces-overview#managing-secrets) `APP_MAX_WORDS` and `APP_OCR_MAX_PAGES` to the desired integer values."
|
657 |
+
)
|
658 |
+
gr.Markdown("---")
|
659 |
|
660 |
load_examples_button.click(
|
661 |
fn=load_single_example_text, inputs=[example_name], outputs=[input_text]
|