Spaces:
Configuration error
Configuration error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +2 -2
src/streamlit_app.py
CHANGED
|
@@ -9,7 +9,7 @@ MODEL_NAME = "AbdullahAlnemr1/flan-t5-summarizer"
|
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
| 10 |
model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME)
|
| 11 |
|
| 12 |
-
st.title("
|
| 13 |
|
| 14 |
input_text = st.text_area("Enter text to summarize:", height=200)
|
| 15 |
|
|
@@ -17,7 +17,7 @@ max_new_tokens = st.slider("Max summary length (tokens)", min_value=20, max_valu
|
|
| 17 |
|
| 18 |
if st.button("Generate Summary"):
|
| 19 |
if input_text.strip() == "":
|
| 20 |
-
st.warning("
|
| 21 |
else:
|
| 22 |
# Tokenize input
|
| 23 |
inputs = tokenizer(input_text, return_tensors="pt", truncation=True)
|
|
|
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
| 10 |
model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME)
|
| 11 |
|
| 12 |
+
st.title("Text Summarizer(Encoder-Decoder)")
|
| 13 |
|
| 14 |
input_text = st.text_area("Enter text to summarize:", height=200)
|
| 15 |
|
|
|
|
| 17 |
|
| 18 |
if st.button("Generate Summary"):
|
| 19 |
if input_text.strip() == "":
|
| 20 |
+
st.warning("Enter text to summarize")
|
| 21 |
else:
|
| 22 |
# Tokenize input
|
| 23 |
inputs = tokenizer(input_text, return_tensors="pt", truncation=True)
|