Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1392,8 +1392,8 @@ class GoogleTranslator(BaseTranslator):
|
|
1392 |
|
1393 |
def translate(txt,to_lang="en",from_lang="auto"):
|
1394 |
log(f'CALL translate')
|
1395 |
-
if from_lang == to_lang or get_language(txt) == to_lang:
|
1396 |
-
print("
|
1397 |
return txt.strip().lower()
|
1398 |
translator = GoogleTranslator(from_lang=from_lang,to_lang=to_lang)
|
1399 |
translation = ""
|
@@ -1443,7 +1443,7 @@ def handle_generation(h,w,d):
|
|
1443 |
Negative: {neg}
|
1444 |
""")
|
1445 |
|
1446 |
-
for img in
|
1447 |
prompt=pos,
|
1448 |
negative_prompt=neg,
|
1449 |
height=h,
|
|
|
1392 |
|
1393 |
def translate(txt,to_lang="en",from_lang="auto"):
|
1394 |
log(f'CALL translate')
|
1395 |
+
if from_lang == to_lang or get_language(txt) == to_lang or len(txt) == 0:
|
1396 |
+
print("Skipping translation...")
|
1397 |
return txt.strip().lower()
|
1398 |
translator = GoogleTranslator(from_lang=from_lang,to_lang=to_lang)
|
1399 |
translation = ""
|
|
|
1443 |
Negative: {neg}
|
1444 |
""")
|
1445 |
|
1446 |
+
for img in image_pipe.flux_pipe_call_that_returns_an_iterable_of_images(
|
1447 |
prompt=pos,
|
1448 |
negative_prompt=neg,
|
1449 |
height=h,
|