Skip to content

Commit

Permalink
made the last change per review.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaleMG authored Oct 18, 2024
1 parent b1f91d7 commit 6c1d55a
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,11 @@ def _translate_text(self, text: str, target_language: Optional[str] = None) -> s
"""
if target_language is None:
target_language = self.target_language
try:
from azure.ai.translation.text import TextTranslationClient
from azure.ai.translation.text.models import InputTextItem

self.translation_client: TextTranslationClient
except ImportError:
raise ImportError("Run 'pip install azure-ai-translation-text'.")
from azure.ai.translation.text import TextTranslationClient
from azure.ai.translation.text.models import InputTextItem

self.translation_client: TextTranslationClient

try:
request_body = [InputTextItem(text=text)]
Expand Down

0 comments on commit 6c1d55a

Please sign in to comment.