Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,8 +36,7 @@ images="festival.jpg"
|
|
36 |
def shot(image, labels_text, model_name, hypothesis_template_prefix, hypothesis_template_suffix, domains_text):
|
37 |
labels = [label.strip(" ") for label in labels_text.strip(" ").split(",")]
|
38 |
domains = [domain.strip(" ") for domain in domains_text.strip(" ").split(",")]
|
39 |
-
hypothesis_template_suffix.format(*domains)
|
40 |
-
hypothesis_template = hypothesis_template_prefix + ' ' + hypothesis_template_suffix
|
41 |
print(hypothesis_template)
|
42 |
|
43 |
res = pipes[model_name](images=image,
|
|
|
36 |
def shot(image, labels_text, model_name, hypothesis_template_prefix, hypothesis_template_suffix, domains_text):
|
37 |
labels = [label.strip(" ") for label in labels_text.strip(" ").split(",")]
|
38 |
domains = [domain.strip(" ") for domain in domains_text.strip(" ").split(",")]
|
39 |
+
hypothesis_template = hypothesis_template_prefix + ' ' + hypothesis_template_suffix.format(*domains)
|
|
|
40 |
print(hypothesis_template)
|
41 |
|
42 |
res = pipes[model_name](images=image,
|