richylyq commited on
Commit
8112e48
1 Parent(s): d9a6f43
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -90,13 +90,13 @@ def opus_trans(article, target_language):
90
  string: translated piece of article based off target_language
91
  """
92
  result_lang = detect_lang(article, target_language)
93
- target_lang = ""
94
  if target_language == "English":
95
  target_lang = "en"
96
  elif target_language == "Chinese":
97
  target_lang = "zh"
98
  # result_lang = detect_lang(article, target_language)
99
-
100
  if result_lang != target_lang:
101
  task_name = f"translation_{result_lang}_to_{target_lang}"
102
  model_name = f"Helsinki-NLP/opus-mt-{result_lang}-{target_lang}"
 
90
  string: translated piece of article based off target_language
91
  """
92
  result_lang = detect_lang(article, target_language)
93
+
94
  if target_language == "English":
95
  target_lang = "en"
96
  elif target_language == "Chinese":
97
  target_lang = "zh"
98
  # result_lang = detect_lang(article, target_language)
99
+ print(target_lang)
100
  if result_lang != target_lang:
101
  task_name = f"translation_{result_lang}_to_{target_lang}"
102
  model_name = f"Helsinki-NLP/opus-mt-{result_lang}-{target_lang}"