segestic commited on
Commit
883c1ff
·
1 Parent(s): c974c12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -58,23 +58,23 @@ import streamlit as st
58
  #from .paraphraser import get_paraphrased_sentences, model, tokenizer
59
 
60
 
61
- def app():
62
- st.title('Paraphraser')
63
- st.write('Please provide the text to be paraphrased')
64
- col1, spacer, col2 = st.columns([3,1,3]) #st.beta_columns((2,1,1,1))
65
-
66
- x = 0
67
- output = ['Result ']
68
- with col1:
69
- user_input = st.text_area('Enter text','', height=200)
70
-
71
- paraphraseNo = st.slider('Number of Parapharases',1,10,2)
72
- if st.button('Paraphrase'):
73
- with st.spinner(text="This may take a moment..."):
74
- output = get_paraphrased_sentences(model, tokenizer, user_input, num_beams=10, num_return_sequences=paraphraseNo)
75
 
76
- #with spacer:
77
-
78
- with col2:
79
- for x, element in enumerate(output):
80
- user_output = st.text_area(label="", value=output[x], height=150 )
 
 
 
 
 
 
58
  #from .paraphraser import get_paraphrased_sentences, model, tokenizer
59
 
60
 
61
+ #def app():
62
+ st.title('Paraphraser')
63
+ st.write('Please provide the text to be paraphrased')
64
+ col1, spacer, col2 = st.columns([3,1,3]) #st.beta_columns((2,1,1,1))
65
+
66
+ x = 0
67
+ output = ['Result ']
68
+ with col1:
69
+ user_input = st.text_area('Enter text','', height=200)
 
 
 
 
 
70
 
71
+ paraphraseNo = st.slider('Number of Parapharases',1,10,2)
72
+ if st.button('Paraphrase'):
73
+ with st.spinner(text="This may take a moment..."):
74
+ output = get_paraphrased_sentences(model, tokenizer, user_input, num_beams=10, num_return_sequences=paraphraseNo)
75
+
76
+ #with spacer:
77
+
78
+ with col2:
79
+ for x, element in enumerate(output):
80
+ user_output = st.text_area(label="", value=output[x], height=150 )