theArijitDas
commited on
Commit
•
b2c33b2
1
Parent(s):
a4e45ab
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from image_validator import Image_Validator
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
image_validator = Image_Validator(model_name="CLIP-ViT Base")
|
5 |
+
|
6 |
+
iface = gr.Interface(image_validator.similarity_score,
|
7 |
+
inputs=["image", "image"],
|
8 |
+
outputs="number",
|
9 |
+
title="Product Description Similarity Calculator",
|
10 |
+
description="Enter two product descriptions to calculate their similarity."
|
11 |
+
)
|
12 |
+
iface.launch()
|