Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -46,6 +46,15 @@ def predict_image(img1, img2):
|
|
46 |
img2 = np.expand_dims(img2, 0)
|
47 |
lab = str(siamese.predict([img1, img2])[0][0])
|
48 |
return lab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
iface = gr.Interface(predict_image, inputs=["sketchpad", "sketchpad"], outputs="label")
|
51 |
iface.launch(debug='True')
|
|
|
46 |
img2 = np.expand_dims(img2, 0)
|
47 |
lab = str(siamese.predict([img1, img2])[0][0])
|
48 |
return lab
|
49 |
+
|
50 |
+
title = "Image similarity estimation using a Siamese Network with a contrastive loss"
|
51 |
+
description = "This space implements a siamese network to compare similar images of the MNIST dataset"
|
52 |
+
article = """<p style='text-align: center'>
|
53 |
+
<a href='https://keras.io/examples/vision/siamese_contrastive/' target='_blank'>Keras Example given by Mehdi</a>
|
54 |
+
<br>
|
55 |
+
Space by @rushic24
|
56 |
+
</p>
|
57 |
+
"""
|
58 |
|
59 |
iface = gr.Interface(predict_image, inputs=["sketchpad", "sketchpad"], outputs="label")
|
60 |
iface.launch(debug='True')
|