Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1392,7 +1392,7 @@ class GoogleTranslator(BaseTranslator):
|
|
1392 |
|
1393 |
def translate(txt,to_lang="en",from_lang="auto"):
|
1394 |
log(f'CALL translate')
|
1395 |
-
if
|
1396 |
print("Skipping translation...")
|
1397 |
return txt.strip().lower()
|
1398 |
translator = GoogleTranslator(from_lang=from_lang,to_lang=to_lang)
|
@@ -1445,7 +1445,7 @@ def handle_generation(h,w,d):
|
|
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,
|
1450 |
width=w,
|
1451 |
output_type="pil",
|
|
|
1392 |
|
1393 |
def translate(txt,to_lang="en",from_lang="auto"):
|
1394 |
log(f'CALL translate')
|
1395 |
+
if len(txt) == 0 or from_lang == to_lang or get_language(txt) == to_lang:
|
1396 |
print("Skipping translation...")
|
1397 |
return txt.strip().lower()
|
1398 |
translator = GoogleTranslator(from_lang=from_lang,to_lang=to_lang)
|
|
|
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,
|
1450 |
width=w,
|
1451 |
output_type="pil",
|