Commit
·
5ff5381
1
Parent(s):
2233526
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,8 @@ checkpoint2 = "wangjin2000/git-base-finetune"
|
|
15 |
#model2 = AutoModelForCausalLM.from_pretrained(checkpoint2, use_auth_token=access_token)
|
16 |
model2 = AutoModelForCausalLM.from_pretrained(checkpoint2)
|
17 |
|
18 |
-
en_zh_translator = pipeline("translation",model="Helsinki-NLP/opus-mt-en-zh")
|
|
|
19 |
|
20 |
def img2cap_com(image):
|
21 |
input1 = processor(images=image, return_tensors="pt").to(device)
|
|
|
15 |
#model2 = AutoModelForCausalLM.from_pretrained(checkpoint2, use_auth_token=access_token)
|
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_en_to_zh",model="stanford-crfm/BioMedLM")
|
20 |
|
21 |
def img2cap_com(image):
|
22 |
input1 = processor(images=image, return_tensors="pt").to(device)
|