Luna4444 commited on
Commit
f56ba56
1 Parent(s): 0af6e97

Update flask_app.py

Browse files
Files changed (1) hide show
  1. 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']) > 10:
26
  return {"result": result['result']}
27
  else:
28
  result_re = obj(template_generator(value, data[value]))
29
- while len(result_re['result']) < 5:
30
  print(f"getting results again, {result_re}")
31
  result_re = obj(template_generator(value, data[value]))
32
- if len(result_re['result']) > 0:
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