vinayakdev commited on
Commit
d0783e0
1 Parent(s): a069fc5

Revert sentence by sentence

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -3,19 +3,15 @@ import generator
3
  from generator import *
4
  import string
5
 
6
- st.info("Enter short paragraphs, please, to get better answers.\n")
7
  text_ar = st.text_area("Enter text:")
8
  col1, col2, col3 = st.columns([2,1,2])
9
-
10
  if(col2.button("Generate!")):
11
  text_ar = text_ar.replace("\n", " ")
12
- text_ar = text_ar.split('.')
13
- for text in text_ar :
14
- if text.isspace() or len(text) == 0:
15
- continue
16
- pairs = creator(text)
17
- for pair in pairs:
18
- st.text(pair)
19
  st.balloons()
20
 
21
 
 
3
  from generator import *
4
  import string
5
 
6
+ st.info("On a large paragraph, less questions will be produced, for increased accuracy.\n")
7
  text_ar = st.text_area("Enter text:")
8
  col1, col2, col3 = st.columns([2,1,2])
9
+ x = st.container()
10
  if(col2.button("Generate!")):
11
  text_ar = text_ar.replace("\n", " ")
12
+ pairs = creator(text_ar)
13
+ for pair in pairs:
14
+ x.text(pair)
 
 
 
 
15
  st.balloons()
16
 
17