Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,11 +33,15 @@ def gen(text):
|
|
33 |
_from = 0
|
34 |
_to = count
|
35 |
|
36 |
-
all_vp =
|
37 |
-
all_not_vp =
|
38 |
|
39 |
if all_vp or all_not_vp:
|
40 |
-
|
|
|
|
|
|
|
|
|
41 |
else:
|
42 |
for i in words.values():
|
43 |
if _from == _to:
|
|
|
33 |
_from = 0
|
34 |
_to = count
|
35 |
|
36 |
+
all_vp = False if str(words).count("'vp': True") == 0 else True
|
37 |
+
all_not_vp = False if str(words).count("'vp': False") == 0 else True
|
38 |
|
39 |
if all_vp or all_not_vp:
|
40 |
+
for i in words.values():
|
41 |
+
if _from == _to:
|
42 |
+
break
|
43 |
+
_from += 1
|
44 |
+
result += f"{i['word']} "
|
45 |
else:
|
46 |
for i in words.values():
|
47 |
if _from == _to:
|