nlpcver commited on
Commit
ce03565
1 Parent(s): aef4b0c

first commit

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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: List[str]):
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)