yangapku commited on
Commit
5119d09
1 Parent(s): a06e4eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -17,9 +17,8 @@ def shot(image, labels_text):
17
  PIL_image = Image.fromarray(np.uint8(image)).convert('RGB')
18
  labels = labels_text.split(",")
19
  res = pipes['chinese-clip-vit-base-patch16'](images=PIL_image,
20
- # candidate_labels=labels,
21
- # hypothesis_template= "This example is {}.")
22
- candidate_labels=labels)
23
  return {dic["label"]: dic["score"] for dic in res}
24
 
25
  iface = gr.Interface(shot,
 
17
  PIL_image = Image.fromarray(np.uint8(image)).convert('RGB')
18
  labels = labels_text.split(",")
19
  res = pipes['chinese-clip-vit-base-patch16'](images=PIL_image,
20
+ candidate_labels=labels,
21
+ hypothesis_template= "{}")
 
22
  return {dic["label"]: dic["score"] for dic in res}
23
 
24
  iface = gr.Interface(shot,