Spaces:
Runtime error
Runtime error
File size: 446 Bytes
d2fcec4 9667a67 8b19034 8a5c7b2 d2fcec4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import streamlit as st
from transformers import pipeline
def summarize_text(text):
unmasker = pipeline("text-classification", model = "roberta-large-mnli")
text_input = unmasker(text)
return text_input
def main():
user_input = st.text_area("Input Text Here")
if st.button("Summarize"):
summary = summarize_text(user_input)
st.write("Summary:")
st.write(summary)
if __name__ == "__main__":
main() |