Yaron Koresh commited on
Commit
77caa9c
·
verified ·
1 Parent(s): f1ff643

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1314,9 +1314,9 @@ def handle_generation(h,w,d):
1314
 
1315
  d = re.sub(r"([ \t]){1,}", " ", d).lower().strip()
1316
  if len(d) > 400:
1317
- d = pos_d if pos_d == "" else summarize(translate(d))
1318
  else:
1319
- d = pos_d if pos_d == "" else translate(d)
1320
  d = re.sub(r"([ \t]){1,}", " ", d).lower().strip()
1321
 
1322
  neg = f"Textual, Text, Distorted, Fake, Discontinuous, Blurry, Doll-Like, Overly Plastic, Low Quality, Paint, Smoothed, Artificial, Phony, Gaudy, Digital Effects."
 
1314
 
1315
  d = re.sub(r"([ \t]){1,}", " ", d).lower().strip()
1316
  if len(d) > 400:
1317
+ d = d if d == "" else summarize(translate(d))
1318
  else:
1319
+ d = d if d == "" else translate(d)
1320
  d = re.sub(r"([ \t]){1,}", " ", d).lower().strip()
1321
 
1322
  neg = f"Textual, Text, Distorted, Fake, Discontinuous, Blurry, Doll-Like, Overly Plastic, Low Quality, Paint, Smoothed, Artificial, Phony, Gaudy, Digital Effects."