richardorama
commited on
Commit
•
c8d7667
1
Parent(s):
4dd480b
Update app.py
Browse files
app.py
CHANGED
@@ -18,13 +18,13 @@ st.title("Assorted Language Tools - AI Craze")
|
|
18 |
import streamlit as st
|
19 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
20 |
|
21 |
-
# Load the
|
22 |
-
MODEL_NAME = "
|
23 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
24 |
model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME)
|
25 |
|
26 |
# Streamlit UI for input
|
27 |
-
st.title("Text Summarization with
|
28 |
|
29 |
# Input text area for the article
|
30 |
article = st.text_area("Enter the text you want to summarize", height=300)
|
@@ -48,6 +48,7 @@ if st.button("Summarize"):
|
|
48 |
st.warning("Please enter some text to summarize!")
|
49 |
|
50 |
|
|
|
51 |
################ STATEMENT SUMMARIZATION #################
|
52 |
|
53 |
# Load the summarization model
|
|
|
18 |
import streamlit as st
|
19 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
20 |
|
21 |
+
# Load the summarization model and tokenizer
|
22 |
+
MODEL_NAME = "facebook/bart-large-cnn" # A commonly used summarization model
|
23 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
24 |
model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME)
|
25 |
|
26 |
# Streamlit UI for input
|
27 |
+
st.title("Text Summarization with BART")
|
28 |
|
29 |
# Input text area for the article
|
30 |
article = st.text_area("Enter the text you want to summarize", height=300)
|
|
|
48 |
st.warning("Please enter some text to summarize!")
|
49 |
|
50 |
|
51 |
+
|
52 |
################ STATEMENT SUMMARIZATION #################
|
53 |
|
54 |
# Load the summarization model
|