Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -450,7 +450,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
450 |
# precision data
|
451 |
|
452 |
seq=256
|
453 |
-
image_steps=
|
454 |
img_accu=0
|
455 |
|
456 |
# ui data
|
@@ -1263,7 +1263,7 @@ def translate(txt,to_lang="en",from_lang="auto"):
|
|
1263 |
log(f'RET translate with translation as {translation}')
|
1264 |
return translation.lower()
|
1265 |
|
1266 |
-
@spaces.GPU(duration=
|
1267 |
def handle_generation(h,w,d):
|
1268 |
|
1269 |
log(f'CALL handle_generate')
|
@@ -1286,9 +1286,9 @@ def handle_generation(h,w,d):
|
|
1286 |
d = re.sub(r"([ \t]){1,}", " ", d)
|
1287 |
d = re.sub(r"(\. \.)", ".", d)
|
1288 |
|
1289 |
-
neg = f"Textual, Text, Blurry, Distorted, Exceptional, Irregular, Unusual, Shiny, Smoothed, Polished, Low Quality, Worst Quality, Normal Quality, Anime
|
1290 |
q = "\""
|
1291 |
-
pos = f'
|
1292 |
|
1293 |
print(f"""
|
1294 |
Positive: {pos}
|
|
|
450 |
# precision data
|
451 |
|
452 |
seq=256
|
453 |
+
image_steps=32
|
454 |
img_accu=0
|
455 |
|
456 |
# ui data
|
|
|
1263 |
log(f'RET translate with translation as {translation}')
|
1264 |
return translation.lower()
|
1265 |
|
1266 |
+
@spaces.GPU(duration=150)
|
1267 |
def handle_generation(h,w,d):
|
1268 |
|
1269 |
log(f'CALL handle_generate')
|
|
|
1286 |
d = re.sub(r"([ \t]){1,}", " ", d)
|
1287 |
d = re.sub(r"(\. \.)", ".", d)
|
1288 |
|
1289 |
+
neg = f"Textual, Text, Blurry, Distorted, Exceptional, Irregular, Unusual, Shiny, Smoothed, Polished, Low Quality, Worst Quality, Normal Quality, Anime, Paint, Movies Quality."
|
1290 |
q = "\""
|
1291 |
+
pos = f'Real-life { "." if d == "" else " of " + d }'
|
1292 |
|
1293 |
print(f"""
|
1294 |
Positive: {pos}
|