yangapku commited on
Commit
494fb65
1 Parent(s): e4fced7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ inputs = [
24
  images="festival.jpg"
25
 
26
  def shot(image, labels_text, model_name):
27
- labels = labels_text.strip(" ").split(",").strip(" ")
28
  res = pipes[model_name](images=image,
29
  candidate_labels=labels,
30
  hypothesis_template= "一张{}的图片。")
 
24
  images="festival.jpg"
25
 
26
  def shot(image, labels_text, model_name):
27
+ labels = [label.strip(" ") for label in labels_text.strip(" ").split(",")]
28
  res = pipes[model_name](images=image,
29
  candidate_labels=labels,
30
  hypothesis_template= "一张{}的图片。")