Spaces:
Runtime error
Runtime error
Commit
·
a8e1f24
1
Parent(s):
8336e59
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import generator
|
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:")
|
@@ -11,6 +11,8 @@ 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)
|
|
|
1 |
import streamlit as st
|
2 |
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:")
|
|
|
11 |
text_ar = text_ar.replace("\n", " ")
|
12 |
text_ar = text_ar.split('.')
|
13 |
for text in text_ar :
|
14 |
+
string.isspace(text):
|
15 |
+
continue
|
16 |
pairs = creator(text)
|
17 |
for pair in pairs:
|
18 |
st.text(pair)
|