mbarnig commited on
Commit
154ea2f
β€’
1 Parent(s): 0a3a588

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -44,8 +44,15 @@ def iwwersetz(source_text, model, direc):
44
  # translation = translator("lb", "en", source_text)
45
  translation = source_text
46
  elif model == "MarianNMT":
47
- translation = source_text
 
 
 
 
 
48
  elif model == "T5-mt5":
 
 
49
  translation = source_text
50
  else:
51
  translation = "Please select a Translation Model !"
 
44
  # translation = translator("lb", "en", source_text)
45
  translation = source_text
46
  elif model == "MarianNMT":
47
+ if direc == "en -> lb":
48
+ translator = pipeline("translation", model=model_checkpoint_marian_en)
49
+ translation = source_text
50
+ else:
51
+ translator = pipeline("translation", model=model_checkpoint_marian_lb)
52
+ translation = source_text
53
  elif model == "T5-mt5":
54
+ translator = pipeline("translation", model=model_checkpoint_t5-mt5)
55
+ translation = source_text
56
  translation = source_text
57
  else:
58
  translation = "Please select a Translation Model !"