first commit
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ version = 'thu-ml/zh-clip-vit-roberta-large-patch14'
|
|
7 |
model = ZhCLIPModel.from_pretrained(version)
|
8 |
processor = ZhCLIPProcessor.from_pretrained(version)
|
9 |
|
10 |
-
def inference(image, texts
|
11 |
texts = [x[0] for x in texts]
|
12 |
inputs = processor(text=texts, images=image, return_tensors="pt", padding=True)
|
13 |
outputs = model(**inputs)
|
|
|
7 |
model = ZhCLIPModel.from_pretrained(version)
|
8 |
processor = ZhCLIPProcessor.from_pretrained(version)
|
9 |
|
10 |
+
def inference(image, texts):
|
11 |
texts = [x[0] for x in texts]
|
12 |
inputs = processor(text=texts, images=image, return_tensors="pt", padding=True)
|
13 |
outputs = model(**inputs)
|