OmarAli123 commited on
Commit
8d38bed
·
1 Parent(s): d66db55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -2,6 +2,8 @@ from transformers import pipeline
2
 
3
  pipe = pipeline("summarization", model="slauw87/bart_summarisation")
4
 
 
 
5
  ARTICLE = """ Newswise — LEXINGTON, Ky. (Nov. 29, 2023) — University of Kentucky Markey Cancer Center research underscores the need for interventions to increase educational attainment and knowledge of cancer in Appalachian Kentucky.
6
 
7
  Kentucky has the highest rate of cancer incidence and mortality in the country, with the Eastern Appalachian region bearing the highest burden due to health, socioeconomic and education disparities including decreased education attainment levels that cause lower health literacy.
@@ -15,5 +17,10 @@ The first paper, published in the International Journal of Environmental Researc
15
  The other study published in the Journal of Cancer Education focuses on increasing knowledge of cancer among young people. The research team created a special lesson program for middle and high school students in Appalachian Kentucky. The cancer knowledge of more than 200 students was tested before and after taking the course.
16
 
17
  "Empowering young people with knowledge about cancer is crucial for early detection, prevention and treatment,” said Vanderford. “This study provides evidence that education-based interventions can effectively increase cancer knowledge, making them a valuable tool to address cancer disparities in Appalachian Kentucky." """
 
 
 
 
 
18
 
19
- print(pipe(ARTICLE, max_length=130, min_length=30, do_sample=False))
 
2
 
3
  pipe = pipeline("summarization", model="slauw87/bart_summarisation")
4
 
5
+ ''''
6
+
7
  ARTICLE = """ Newswise — LEXINGTON, Ky. (Nov. 29, 2023) — University of Kentucky Markey Cancer Center research underscores the need for interventions to increase educational attainment and knowledge of cancer in Appalachian Kentucky.
8
 
9
  Kentucky has the highest rate of cancer incidence and mortality in the country, with the Eastern Appalachian region bearing the highest burden due to health, socioeconomic and education disparities including decreased education attainment levels that cause lower health literacy.
 
17
  The other study published in the Journal of Cancer Education focuses on increasing knowledge of cancer among young people. The research team created a special lesson program for middle and high school students in Appalachian Kentucky. The cancer knowledge of more than 200 students was tested before and after taking the course.
18
 
19
  "Empowering young people with knowledge about cancer is crucial for early detection, prevention and treatment,” said Vanderford. “This study provides evidence that education-based interventions can effectively increase cancer knowledge, making them a valuable tool to address cancer disparities in Appalachian Kentucky." """
20
+ ''''
21
+
22
+ def predict(prompt):
23
+ completion = model(prompt)[0]["generated_text"]
24
+ return completion
25
 
26
+ #print(pipe(ARTICLE, max_length=130, min_length=30, do_sample=False))