perkan commited on
Commit
b33dc77
1 Parent(s): 505e222

[FIX] => corrected model imports

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -2,10 +2,10 @@ import gradio as gr
2
  from transformers import pipeline
3
 
4
  # Load models
5
- base_model = pipeline('translation_en_to_fr', model='Helsinki-NLP/opus-mt-en-fr')
6
- fine_tuned_model_1 = pipeline('translation_en_to_fr', model='path/to/fine-tuned-model-1')
7
- fine_tuned_model_2 = pipeline('translation_en_to_fr', model='path/to/fine-tuned-model-2')
8
- fine_tuned_model_3 = pipeline('translation_en_to_fr', model='path/to/fine-tuned-model-3')
9
 
10
  # Define translation functions
11
  def translate_base(text):
 
2
  from transformers import pipeline
3
 
4
  # Load models
5
+ base_model = pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-base-en-sh")
6
+ fine_tuned_model_1 = pipeline("translation", model="perkan/shortS-opus-mt-tc-base-en-sr")
7
+ fine_tuned_model_2 = pipeline("translation", model="perkan/shortM-opus-mt-tc-base-en-sr")
8
+ fine_tuned_model_3 = pipeline("translation", model="perkan/shortL-opus-mt-tc-base-en-sr")
9
 
10
  # Define translation functions
11
  def translate_base(text):