From f85b0e6145acb5a6cc4a7ad4b805bb1d1011792b Mon Sep 17 00:00:00 2001 From: dsdanielpark Date: Wed, 27 Dec 2023 15:59:46 +0900 Subject: [PATCH] fix: unnecessary translator object (#252) --- bardapi/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bardapi/core.py b/bardapi/core.py index cb8a075f1..3026ae20b 100644 --- a/bardapi/core.py +++ b/bardapi/core.py @@ -669,7 +669,7 @@ def ask_about_image( google_official_translator = translate.Client( api_key=self.google_translator_api_key ) - else: + elif self.language is not None or lang is not None: translator_to_eng = GoogleTranslator(source="auto", target="en") # [Optional] Set language