ashishraics commited on
Commit
9954d48
1 Parent(s): 9f7e51c
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -136,6 +136,12 @@ if select_task=='README':
136
  if select_task=='Basic Fill Blanks':
137
  input_text = st.text_area(label='Input paragraph', height=500, max_chars=2000, value=default_paratext)
138
  create_fib=st.button("Create Questions")
 
 
 
 
 
 
139
 
140
  if create_fib:
141
  st.write(1)
 
136
  if select_task=='Basic Fill Blanks':
137
  input_text = st.text_area(label='Input paragraph', height=500, max_chars=2000, value=default_paratext)
138
  create_fib=st.button("Create Questions")
139
+ tokenized_sent = tokenize_sentence(input_text)
140
+ keywords_noun_adj_verb = get_noun_adj_verb(input_text)
141
+ keyword_sent_noun_verb_adj = get_keywords_sentence(keywords=keywords_noun_adj_verb, tokenized_sent=tokenized_sent)
142
+ answer, fib = create_blanks(keyword_sentence_dict=keyword_sent_noun_verb_adj)
143
+ for i, (answer, fib) in enumerate(zip(answer, fib)):
144
+ st.markdown(f"* {fib} | **Answer is *{answer}* ** ", unsafe_allow_html=True)
145
 
146
  if create_fib:
147
  st.write(1)