wangjin2000 commited on
Commit
fafd14d
1 Parent(s): 5ab8f78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -16,7 +16,8 @@ checkpoint2 = "wangjin2000/git-base-finetune"
16
  model2 = AutoModelForCausalLM.from_pretrained(checkpoint2)
17
 
18
  #en_zh_translator = pipeline("translation",model="Helsinki-NLP/opus-mt-en-zh")
19
- en_zh_translator = pipeline("translation",model="t5-base", src_lang = 'en', tgt_lang = 'zh')
 
20
 
21
  def img2cap_com(image):
22
  input1 = processor(images=image, return_tensors="pt").to(device)
 
16
  model2 = AutoModelForCausalLM.from_pretrained(checkpoint2)
17
 
18
  #en_zh_translator = pipeline("translation",model="Helsinki-NLP/opus-mt-en-zh")
19
+ #en_zh_translator = pipeline("translation",model="Randeng-Deltalm-362M-En-Zh", src_lang = 'en', tgt_lang = 'zh')
20
+ en_zh_translator = pipeline("translation",model="Randeng-Deltalm-362M-En-Zh")
21
 
22
  def img2cap_com(image):
23
  input1 = processor(images=image, return_tensors="pt").to(device)