Spaces:
Runtime error
Runtime error
Commit
·
07151db
1
Parent(s):
189514b
Sentence by sentence generation
Browse files
app.py
CHANGED
@@ -3,14 +3,17 @@ import generator
|
|
3 |
from generator import *
|
4 |
|
5 |
|
6 |
-
st.info("
|
7 |
text_ar = st.text_area("Enter text:")
|
8 |
col1, col2, col3 = st.columns([2,1,2])
|
9 |
|
10 |
if(col2.button("Generate!")):
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
st.balloons()
|
15 |
|
16 |
|
|
|
3 |
from generator import *
|
4 |
|
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 |
+
pairs = creator(text)
|
15 |
+
for pair in pairs:
|
16 |
+
st.text(pair)
|
17 |
st.balloons()
|
18 |
|
19 |
|