Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,11 +9,11 @@ def get_image_embedding(image):
|
|
| 9 |
|
| 10 |
# Load and preprocess the image
|
| 11 |
img_emb = image_model.encode(image)
|
| 12 |
-
|
| 13 |
return {"prediction": img_emb}
|
| 14 |
|
| 15 |
|
| 16 |
image_input = gr.Image(type="pil")
|
| 17 |
-
label_output = gr.outputs.
|
| 18 |
|
| 19 |
gr.Interface(fn=get_image_embedding, inputs=image_input, outputs=label_output).launch()
|
|
|
|
| 9 |
|
| 10 |
# Load and preprocess the image
|
| 11 |
img_emb = image_model.encode(image)
|
| 12 |
+
print(img_emb)
|
| 13 |
return {"prediction": img_emb}
|
| 14 |
|
| 15 |
|
| 16 |
image_input = gr.Image(type="pil")
|
| 17 |
+
label_output = gr.outputs.JSON()
|
| 18 |
|
| 19 |
gr.Interface(fn=get_image_embedding, inputs=image_input, outputs=label_output).launch()
|