hhval commited on
Commit
85ef857
·
verified ·
1 Parent(s): b4cfde3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -4,7 +4,6 @@ import requests
4
  import pytz
5
  import yaml
6
  import json
7
- from googletrans import Translator
8
  from tools.final_answer import FinalAnswerTool
9
  import subprocess
10
 
@@ -15,6 +14,8 @@ try:
15
  except subprocess.CalledProcessError:
16
  print("Failed to install googletrans.")
17
 
 
 
18
  @tool
19
  def translate_to_norwegian(text: str) -> str:
20
  """A tool that translates the input text to Norwegian using Google Translate.
 
4
  import pytz
5
  import yaml
6
  import json
 
7
  from tools.final_answer import FinalAnswerTool
8
  import subprocess
9
 
 
14
  except subprocess.CalledProcessError:
15
  print("Failed to install googletrans.")
16
 
17
+ from googletrans import Translator
18
+
19
  @tool
20
  def translate_to_norwegian(text: str) -> str:
21
  """A tool that translates the input text to Norwegian using Google Translate.