MrGanesh commited on
Commit
5d61502
·
1 Parent(s): d12b8d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -3,6 +3,7 @@ import pandas as pd
3
  #import torch
4
  from transformers import pipeline
5
  import streamlit as st
 
6
 
7
 
8
  def app():
@@ -11,15 +12,16 @@ def app():
11
  st.markdown("This is a Web application that Summarizes Text 😎")
12
  text=st.text_area('Enter Text')
13
 
 
14
  summarize = st.button("Summarize")
15
 
16
  # Check to see if a file has been uploaded
17
  if summarize:
18
  st.success("Summarizing Text, Please wait...")
19
- summarizer = pipeline("summarization", model="google/bigbird-pegasus-large-bigpatent"
20
  # If it has then do the following:
21
- out=summarizer(text,min_length=100, max_length=400)
22
- st.json(out)
 
23
 
24
 
25
 
 
3
  #import torch
4
  from transformers import pipeline
5
  import streamlit as st
6
+ summarizer = pipeline("summarization", model="google/bigbird-pegasus-large-bigpatent"
7
 
8
 
9
  def app():
 
12
  st.markdown("This is a Web application that Summarizes Text 😎")
13
  text=st.text_area('Enter Text')
14
 
15
+
16
  summarize = st.button("Summarize")
17
 
18
  # Check to see if a file has been uploaded
19
  if summarize:
20
  st.success("Summarizing Text, Please wait...")
 
21
  # If it has then do the following:
22
+ result=summarizer(text,min_length=100, max_length=400)
23
+ st.header(result)
24
+
25
 
26
 
27