Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
# Load the summarization pipeline from Hugging Face
|
5 |
+
summarizer = pipeline("summarization", model="alit2204/check")
|
6 |
+
|
7 |
+
# Streamlit interface
|
8 |
+
st.title("Text Summarization App")
|
9 |
+
|
10 |
+
# get the topic
|
11 |
+
text = st.text_area("Enter the text to be summarized")
|
12 |
+
|
13 |
+
if text:
|
14 |
+
output = summarizer(text)
|
15 |
+
|
16 |
+
st.write(output)
|