Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,20 +22,13 @@ def calculate_score(image, text):
|
|
22 |
|
23 |
|
24 |
if __name__ == "__main__":
|
25 |
-
cat_example = [
|
26 |
-
"cat.jpg",
|
27 |
-
"a cat stuck in a door; a cat in the air; a cat sitting; a cat standing; a cat is entering the matrix; a cat is entering the void",
|
28 |
-
]
|
29 |
|
30 |
demo = gr.Interface(
|
31 |
fn=calculate_score,
|
32 |
inputs=["image", "text"],
|
33 |
outputs="label",
|
34 |
-
examples=[cat_example],
|
35 |
allow_flagging="never",
|
36 |
description="# CLIP Score",
|
37 |
-
article="Calculate the [CLIP](https://openai.com/blog/clip/) score of a given image and text",
|
38 |
-
cache_examples=True,
|
39 |
)
|
40 |
|
41 |
demo.launch()
|
|
|
22 |
|
23 |
|
24 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
25 |
|
26 |
demo = gr.Interface(
|
27 |
fn=calculate_score,
|
28 |
inputs=["image", "text"],
|
29 |
outputs="label",
|
|
|
30 |
allow_flagging="never",
|
31 |
description="# CLIP Score",
|
|
|
|
|
32 |
)
|
33 |
|
34 |
demo.launch()
|