zmbfeng commited on
Commit
774748a
·
1 Parent(s): c7fa677

paraphrase progress bar added

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -220,6 +220,7 @@ if 'paragraph_sentence_encodings' in st.session_state:
220
 
221
  if "paraphrased_paragrpahs" not in st.session_state:
222
  st.session_state.paraphrased_paragrpahs = []
 
223
  for i, (similarity_score, commonality_score, paragraph) in enumerate(st.session_state.paragraph_scores[:5]):
224
 
225
 
@@ -228,6 +229,7 @@ if 'paragraph_sentence_encodings' in st.session_state:
228
  output_2 = paraphrase(output_1)
229
  # print(output_2)
230
  st.session_state.paraphrased_paragrpahs.append(output_2)
 
231
  st.write("Top scored paragraphs and their scores:")
232
  for i, (similarity_score, commonality_score, paragraph) in enumerate(
233
  st.session_state.paragraph_scores[:5]):
 
220
 
221
  if "paraphrased_paragrpahs" not in st.session_state:
222
  st.session_state.paraphrased_paragrpahs = []
223
+ processing_progress_bar=st.progress(0)
224
  for i, (similarity_score, commonality_score, paragraph) in enumerate(st.session_state.paragraph_scores[:5]):
225
 
226
 
 
229
  output_2 = paraphrase(output_1)
230
  # print(output_2)
231
  st.session_state.paraphrased_paragrpahs.append(output_2)
232
+ processing_progress_bar.progress(i / (len(st.session_state.paragraph_scores[:5]) - 1))
233
  st.write("Top scored paragraphs and their scores:")
234
  for i, (similarity_score, commonality_score, paragraph) in enumerate(
235
  st.session_state.paragraph_scores[:5]):