Commit
•
672c8e9
1
Parent(s):
ce5126d
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ 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("
|
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",src_lang = "en", tgt_lang = "zh")
|
19 |
|
20 |
def img2cap_com(image):
|
21 |
input1 = processor(images=image, return_tensors="pt").to(device)
|