code7 / app.py
Ankush05's picture
this
dd9ab56
raw
history blame contribute delete
343 Bytes
import streamlit as st
from transformers import pipeline
summarizer = pipeline("summarization")
summarizer("An apple a day, keeps the doctor away", min_length=5, max_length=30)
if query := st.chat_input("Summarize: "):
ans = summarizer(query, min_length=5, max_length=30)
with st.chat_message("User"):
st.write(ans)