Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
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 =
|
1318 |
else:
|
1319 |
-
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."
|