AjayKr09 commited on
Commit
a7cc2f7
1 Parent(s): ce3f28f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import numpy as np
4
+ import torch
5
+ import transformers
6
+
7
+ # Use a pipeline as a high-level helper
8
+ from transformers import pipeline
9
+
10
+ pipe = pipeline("summarization", model="facebook/bart-large-xsum")
11
+
12
+ st.write('\n')
13
+
14
+ st.write('Enter Text for Summarization:')
15
+
16
+ text=st.text_input("")
17
+
18
+ if st.button("Submit"):
19
+ st.write(pipe(text))