01
Long documents
Research papers and journal articles are long, and a good summary takes a careful read.
NLP · TOOL
A small Gradio app that turns pasted academic text into a short summary with DistilBART, using a copy of the model saved on my own machine. I built it because summarizing paper after paper by hand was slowing down my literature reviews.

THE GAP
As a graduate researcher I regularly had to read and summarize long papers and journal articles. It's slow, tiring work, and it holds up the part of a review that matters most: putting the ideas together.
01
Research papers and journal articles are long, and a good summary takes a careful read.
02
A review means doing that for paper after paper, and the time adds up fast.
03
It's routine and mentally draining, and it slows down the synthesis the review is for.
WHAT IT DOES
It's a Gradio page with two boxes and two buttons. Paste an abstract, a section or an article on the left, press Generate Summary, and DistilBART writes a summary on the right. The model loads from a local snapshot, so once it's downloaded the app runs without a network connection.
The image at the top is a real run of the same checkpoint: the abstract of my IEEE Access survey, 308 words in and 44 out.
The model loads from a saved snapshot on disk, so after one download it runs without a connection.
distilbart-cnn-12-6 has 306M parameters against 406M for BART-large-CNN, per its model card.
The checkpoint's own settings apply: beam search with 4 beams and summaries of 56 to 142 tokens.
Empty or too-short input gets a message instead of a model call, and model errors show in the app.
HOW IT WORKS
Drop an abstract, a paper section or an article into the input box.
Empty text or anything under five characters gets a message, not a model call.
DistilBART generates a summary of 56 to 142 tokens with beam search.
The summary appears on the right, and the input box clears.
One click empties both boxes for the next piece of text.
SYSTEM DESIGN
The whole app is 84 lines of Python: a Gradio page, a validation function and a Hugging Face summarization pipeline pointed at a local copy of the model.
Input
Gradio textbox
pasted abstract, section or article
Checks
Validation
rejects empty or under-5-character input
Model
Summarization pipeline
Hugging Face Transformers, one call per request
distilbart-cnn-12-6
12 encoder and 6 decoder layers
Local snapshot
loaded from disk, works offline
Output
Summary box
56 to 142 tokens, 4-beam search
RESULTS
84
lines of Python for the whole app
306M
parameters, against 406M for BART-large-CNN
1,024
tokens the model can read in one request
56–142
tokens per summary, from the checkpoint's defaults
These describe the tool, not its quality. The ROUGE scores on the model card are for news, and the repo has no evaluation on academic text.
WHAT IT TAUGHT ME
The model was fine-tuned on CNN/DailyMail news articles, not papers, so academic writing is outside what it learned from, and nothing in the repo measures how well it does there. It also reads at most 1,024 tokens, and the app passes text in one piece without splitting it. On CPU, a 1,382-token input fails with an index error, so longer text has to go in a section at a time.
BUILT WITH
Like what you see?
Thanks for reading. There's more where this came from.