feat: revert adding translate feature #2

This commit is contained in:
Manuel Schmid 2024-07-16 14:00:30 +02:00
parent 069bea534b
commit d46e47ab3d
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
3 changed files with 0 additions and 17 deletions

View File

@ -197,7 +197,6 @@ def worker():
from modules.upscaler import perform_upscale
from modules.flags import Performance
from modules.meta_parser import get_metadata_parser
from modules.translator import translate2en
pid = os.getpid()
print(f'Started worker with PID {pid}')

View File

@ -1,15 +0,0 @@
import translators
from functools import lru_cache
@lru_cache(maxsize=32, typed=False)
def translate2en(text, element):
if not text:
return text
try:
result = translators.translate_text(text,to_language='en')
print(f'[Parameters] Translated {element}: {result}')
return result
except Exception as e:
print(f'[Parameters] Error during translation of {element}: {e}')
return text

View File

@ -16,7 +16,6 @@ opencv-contrib-python==4.8.0.74
httpx==0.24.1
onnxruntime==1.16.3
timm==0.9.2
translators==5.9.2
rembg==2.0.57
groundingdino-py==0.4.0
segment_anything==1.0