Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ model = AutoModelForCausalLM.from_pretrained(model_name)
|
|
| 8 |
|
| 9 |
# Create the Streamlit app
|
| 10 |
st.title("Text Summarization App")
|
| 11 |
-
text_input = st.
|
| 12 |
if st.button("Summarize"):
|
| 13 |
input_ids = tokenizer.encode(text_input, return_tensors="pt")
|
| 14 |
summary_ids = model.generate(input_ids, max_length=100, min_length=20, do_sample=False)
|
|
|
|
| 8 |
|
| 9 |
# Create the Streamlit app
|
| 10 |
st.title("Text Summarization App")
|
| 11 |
+
text_input = st.text_area("Enter text to summarize")
|
| 12 |
if st.button("Summarize"):
|
| 13 |
input_ids = tokenizer.encode(text_input, return_tensors="pt")
|
| 14 |
summary_ids = model.generate(input_ids, max_length=100, min_length=20, do_sample=False)
|