Spaces:
Running
Running
Update index.html
Browse files- index.html +65 -16
index.html
CHANGED
|
@@ -3,26 +3,75 @@
|
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8" />
|
| 6 |
-
<link rel="stylesheet" href="style.css" />
|
| 7 |
-
|
| 8 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 9 |
-
<title>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
</head>
|
| 11 |
|
| 12 |
<body>
|
| 13 |
-
<
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
<script src="index.js" type="module"></script>
|
| 27 |
</body>
|
| 28 |
|
|
|
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8" />
|
|
|
|
|
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
+
<title>Image Similarity Comparison</title>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
|
| 9 |
+
<link rel="stylesheet" href="style.css">
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom/dist/chartjs-plugin-zoom.min.js"></script>
|
| 12 |
</head>
|
| 13 |
|
| 14 |
<body>
|
| 15 |
+
<div class="container">
|
| 16 |
+
<div class="panels-wrapper">
|
| 17 |
+
<div class="left-panel">
|
| 18 |
+
<div class="header">
|
| 19 |
+
<h1>Image Similarity Comparison</h1>
|
| 20 |
+
<p>Upload two images to calculate their visual similarity</p>
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
+
<div class="info-section">
|
| 24 |
+
<div class="info-header">
|
| 25 |
+
<i class="fas fa-info-circle"></i>
|
| 26 |
+
<span>How Image Comparison Works</span>
|
| 27 |
+
</div>
|
| 28 |
+
<div class="info-content">
|
| 29 |
+
<p><i class="fas fa-brain"></i>The CLIP model generates a numerical representation (embedding) for each image, capturing its semantic meaning.</p>
|
| 30 |
+
<p><i class="fas fa-calculator"></i>By calculating the cosine similarity between the two image embeddings, we can determine how visually similar they are.</p>
|
| 31 |
+
<p><i class="fas fa-chart-line"></i>A higher score (closer to 100%) means the model considers the images to be more alike in content and style.</p>
|
| 32 |
+
</div>
|
| 33 |
+
</div>
|
| 34 |
+
|
| 35 |
+
<label for="file-upload" id="drop-zone" class="upload-label">
|
| 36 |
+
<i class="fas fa-cloud-upload-alt"></i>
|
| 37 |
+
<span>Drag & drop images here, or click to upload</span>
|
| 38 |
+
<small>You can drop two images at once</small>
|
| 39 |
+
</label>
|
| 40 |
+
<input type="file" id="file-upload" accept="image/*" multiple style="display: none;">
|
| 41 |
+
|
| 42 |
+
<div id="status-indicator">
|
| 43 |
+
<div class="spinner"></div>
|
| 44 |
+
<span id="status-text"></span>
|
| 45 |
+
</div>
|
| 46 |
+
<div class="clear-section">
|
| 47 |
+
<button id="clear-btn"><i class="fas fa-trash"></i> Clear Images</button>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
<div class="right-panel">
|
| 52 |
+
<div class="back-link-section">
|
| 53 |
+
<a href="index.html" class="back-link">
|
| 54 |
+
<i class="fas fa-arrow-left"></i>
|
| 55 |
+
<span>Zero-Shot Classification</span>
|
| 56 |
+
</a>
|
| 57 |
+
</div>
|
| 58 |
+
<div class="image-display-area">
|
| 59 |
+
<div id="image-preview-1" class="image-preview"></div>
|
| 60 |
+
<div id="image-preview-2" class="image-preview"></div>
|
| 61 |
+
</div>
|
| 62 |
+
<div id="meter-container"></div>
|
| 63 |
+
<div class="action-buttons">
|
| 64 |
+
<button id="show-graph-btn" style="display: none;">Show Embeddings</button>
|
| 65 |
+
</div>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
</div>
|
| 69 |
+
<div id="graph-modal" class="modal">
|
| 70 |
+
<div class="modal-content">
|
| 71 |
+
<span class="close-button">×</span>
|
| 72 |
+
<div id="graph-container-modal"></div>
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
<script src="index.js" type="module"></script>
|
| 76 |
</body>
|
| 77 |
|