Spaces:
Runtime error
Runtime error
wangjin2000
commited on
Commit
•
fafd14d
1
Parent(s):
5ab8f78
Update app.py
Browse files
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="
|
|
|
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)
|