Spaces:
Runtime error
Runtime error
Update flask_app.py
Browse files- flask_app.py +3 -3
flask_app.py
CHANGED
@@ -22,14 +22,14 @@ def rewriter():
|
|
22 |
def generate(data, value):
|
23 |
obj = abstract_generator_obj(value)
|
24 |
result = obj(template_generator(value, data[value]))
|
25 |
-
if len(result['result']) >
|
26 |
return {"result": result['result']}
|
27 |
else:
|
28 |
result_re = obj(template_generator(value, data[value]))
|
29 |
-
while len(result_re['result']) <
|
30 |
print(f"getting results again, {result_re}")
|
31 |
result_re = obj(template_generator(value, data[value]))
|
32 |
-
if len(result_re['result']) >
|
33 |
return {"result": result_re['result']}
|
34 |
|
35 |
|
|
|
22 |
def generate(data, value):
|
23 |
obj = abstract_generator_obj(value)
|
24 |
result = obj(template_generator(value, data[value]))
|
25 |
+
if len(result['result']) > 40:
|
26 |
return {"result": result['result']}
|
27 |
else:
|
28 |
result_re = obj(template_generator(value, data[value]))
|
29 |
+
while len(result_re['result']) < 50:
|
30 |
print(f"getting results again, {result_re}")
|
31 |
result_re = obj(template_generator(value, data[value]))
|
32 |
+
if len(result_re['result']) > 40:
|
33 |
return {"result": result_re['result']}
|
34 |
|
35 |
|