ArticlePara / apps /paraphraseApp.py
olusegun.odewole
first commit
8749106
raw
history blame
619 Bytes
import streamlit as st
from paraphraser import get_paraphrased_sentences, model, tokenizer
def app():
st.title('Paraphraser')
st.write('Please provide the text to be paraphrased')
user_input = st.text_area('Enter text','')
paraphraseNo = st.slider('Number of Parapharases',1,2,10)
if st.button('Paraphrase'):
output = get_paraphrased_sentences(model, tokenizer, user_input, num_beams=10, num_return_sequences=paraphraseNo)
st.write("Paraphrased Text: ")
st.write(output)
##get_paraphrased_sentences(model, tokenizer, sentence, num_beams=10, num_return_sequences=10)