LeaBresson's picture
Add app file
30777b7
import gradio as gr
title = "🪶 PubMed Summarization Tool"
description = '<p style="text-align:center;"><img src="https://dynomapper.com/images/Google_Search_Console_for_Seo_banner_4.jpg"></p>'
article = "<p style='text-align: center'> ℹ️ This model is fine-tuned using Autotrain on 3000 PubMed summaries</p>"
textbox = gr.Textbox(label="Text to be summarized", lines=2)
text1 = """
Screening exams find disease before symptoms begin. The goal of screening is to detect disease at its earliest and most treatable stage.
In order to be widely accepted and recommended by medical practitioners, a screening program must meet a number of criteria, including reducing
the number of deaths from the given disease.
Screening tests may include lab tests that check blood and other fluids, genetic tests that look for inherited genetic markers linked to disease,
and imaging exams that produce pictures of the inside of the body. These tests are typically available to the general population.
However, an individual's needs for a specific screening test are based on factors such as age, gender, and family history.
"""
text2 = """
Low-dose aspirin helps to prevent heart attacks and strokes in people who are at high risk of them. Aspirin is also known as acetylsalicylic
acid. Your doctor may suggest that you take a daily low dose if you have had a stroke or a heart attack to help stop you having another one.
Or, if you're at high risk of heart attack – for example, if you have had heart surgery or if you have chest pain (angina) caused by heart disease.
If you’re pregnant, you may be recommended to take low-dose aspirin if:
you’re at risk of high blood pressure (pre-eclampsia)
you have underlying medical conditions where you have been advised to take low dose aspirin
you have had several miscarriages or complications in a previous pregnancy
Only take daily low-dose aspirin if your doctor recommends it. Low-dose aspirin comes as tablets, including tablets that dissolve in a drink of
water (soluble) and tablets with a special coating (enteric coated/gastro-resistant) to help to protect your stomach.
It's available on prescription. You can also buy it from pharmacies. However, if you’re pregnant, or having fertility treatment, low-dose aspirin
will need to be prescribed by your doctor, a pregnancy specialist (obstetrician) or a midwife.
Children are sometimes treated with low-dose aspirin after heart surgery or to treat a rare condition called Kawasaki disease.
Children should only take low-dose aspirin if a doctor prescribes it.
Taking low-dose aspirin to prevent heart attacks and strokes is not the same as taking aspirin for pain relief.
"""
gr.Interface.load("models/LeaBresson/autotrain-summarization-pubmed-sample-3609596599",
inputs=textbox,
outputs="text",
title=title,
description=description,
article=article,
examples=[[text1], [text2]],
).launch()