Afantauzzi commited on
Commit
af1772b
·
verified ·
1 Parent(s): 34e7665

[Write the prompt and context for the following as you would write it to your self.]Make a code using the best programing language for a reverse image search like yandex images ,bing images ,lenoso Ai, pimeyes., and facecheck.id. - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +317 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Reverse Image Space
3
- emoji: 🐨
4
- colorFrom: gray
5
- colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: reverse-image-space
3
+ emoji: 🐳
4
+ colorFrom: green
5
+ colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,317 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>ImageSearch Pro - Reverse Image Search Engine</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .dropzone {
11
+ border: 2px dashed #cbd5e0;
12
+ transition: all 0.3s ease;
13
+ }
14
+ .dropzone.active {
15
+ border-color: #4f46e5;
16
+ background-color: #f0f4ff;
17
+ }
18
+ .search-engine-logo {
19
+ filter: grayscale(100%);
20
+ opacity: 0.6;
21
+ transition: all 0.3s ease;
22
+ }
23
+ .search-engine-logo:hover {
24
+ filter: grayscale(0);
25
+ opacity: 1;
26
+ }
27
+ .result-card {
28
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
29
+ }
30
+ .result-card:hover {
31
+ transform: translateY(-2px);
32
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
33
+ }
34
+ </style>
35
+ </head>
36
+ <body class="bg-gray-50 min-h-screen">
37
+ <div class="container mx-auto px-4 py-8">
38
+ <!-- Header -->
39
+ <header class="mb-12 text-center">
40
+ <h1 class="text-4xl font-bold text-indigo-700 mb-2">ImageSearch <span class="text-indigo-500">Pro</span></h1>
41
+ <p class="text-gray-600">Find similar images across the web with our powerful reverse image search</p>
42
+ </header>
43
+
44
+ <!-- Main Search Area -->
45
+ <div class="max-w-3xl mx-auto bg-white rounded-xl shadow-md overflow-hidden mb-12">
46
+ <div class="p-8">
47
+ <div class="flex justify-center space-x-4 mb-6">
48
+ <button id="upload-tab" class="px-4 py-2 font-medium text-indigo-600 border-b-2 border-indigo-600">Upload Image</button>
49
+ <button id="url-tab" class="px-4 py-2 font-medium text-gray-500 hover:text-indigo-600">Image URL</button>
50
+ </div>
51
+
52
+ <!-- Upload Section -->
53
+ <div id="upload-section" class="space-y-6">
54
+ <div id="dropzone" class="dropzone rounded-lg p-12 text-center cursor-pointer">
55
+ <div class="mx-auto w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mb-4">
56
+ <i class="fas fa-cloud-upload-alt text-indigo-500 text-2xl"></i>
57
+ </div>
58
+ <h3 class="text-lg font-medium text-gray-700 mb-1">Drag & Drop your image here</h3>
59
+ <p class="text-gray-500 text-sm mb-4">or</p>
60
+ <label for="file-upload" class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 cursor-pointer transition">
61
+ Browse Files
62
+ </label>
63
+ <input id="file-upload" type="file" class="hidden" accept="image/*">
64
+ <p class="text-xs text-gray-400 mt-4">Supports JPG, PNG, WEBP up to 10MB</p>
65
+ </div>
66
+ </div>
67
+
68
+ <!-- URL Section (hidden by default) -->
69
+ <div id="url-section" class="hidden space-y-6">
70
+ <div class="flex">
71
+ <input type="text" id="image-url" placeholder="Paste image URL here..."
72
+ class="flex-1 px-4 py-2 border border-gray-300 rounded-l-md focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
73
+ <button id="search-url" class="px-6 py-2 bg-indigo-600 text-white rounded-r-md hover:bg-indigo-700 transition">
74
+ Search
75
+ </button>
76
+ </div>
77
+ <div class="text-center">
78
+ <p class="text-gray-500 text-sm">Example: https://example.com/image.jpg</p>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ <!-- Search Engines -->
85
+ <div class="max-w-4xl mx-auto mb-12">
86
+ <h2 class="text-xl font-semibold text-gray-800 mb-6 text-center">Search across multiple engines</h2>
87
+ <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-4">
88
+ <div class="search-engine-logo p-4 bg-white rounded-lg shadow-sm flex items-center justify-center">
89
+ <img src="https://yandex.com/images/favicon.ico" alt="Yandex" class="h-8">
90
+ </div>
91
+ <div class="search-engine-logo p-4 bg-white rounded-lg shadow-sm flex items-center justify-center">
92
+ <img src="https://www.bing.com/favicon.ico" alt="Bing" class="h-8">
93
+ </div>
94
+ <div class="search-engine-logo p-4 bg-white rounded-lg shadow-sm flex items-center justify-center">
95
+ <img src="https://lens.google.com/favicon.ico" alt="Google Lens" class="h-8">
96
+ </div>
97
+ <div class="search-engine-logo p-4 bg-white rounded-lg shadow-sm flex items-center justify-center">
98
+ <img src="https://pimeyes.com/favicon.ico" alt="PimEyes" class="h-8">
99
+ </div>
100
+ <div class="search-engine-logo p-4 bg-white rounded-lg shadow-sm flex items-center justify-center">
101
+ <img src="https://facecheck.id/favicon.ico" alt="FaceCheck" class="h-8">
102
+ </div>
103
+ </div>
104
+ </div>
105
+
106
+ <!-- Results Section (hidden by default) -->
107
+ <div id="results-section" class="hidden max-w-6xl mx-auto">
108
+ <div class="flex justify-between items-center mb-6">
109
+ <h2 class="text-2xl font-bold text-gray-800">Search Results</h2>
110
+ <button id="new-search" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 transition">
111
+ <i class="fas fa-redo mr-2"></i>New Search
112
+ </button>
113
+ </div>
114
+
115
+ <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
116
+ <!-- Sample results - these would be populated dynamically in a real app -->
117
+ <div class="result-card bg-white rounded-lg overflow-hidden shadow-sm border border-gray-100">
118
+ <div class="h-48 overflow-hidden">
119
+ <img src="https://source.unsplash.com/random/300x200?nature" alt="Result" class="w-full h-full object-cover">
120
+ </div>
121
+ <div class="p-4">
122
+ <h3 class="font-medium text-gray-800 mb-1">Similar image found</h3>
123
+ <p class="text-sm text-gray-500 mb-2">example.com</p>
124
+ <div class="flex justify-between items-center">
125
+ <span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">85% match</span>
126
+ <a href="#" class="text-indigo-600 text-sm hover:underline">View source</a>
127
+ </div>
128
+ </div>
129
+ </div>
130
+
131
+ <div class="result-card bg-white rounded-lg overflow-hidden shadow-sm border border-gray-100">
132
+ <div class="h-48 overflow-hidden">
133
+ <img src="https://source.unsplash.com/random/300x200?portrait" alt="Result" class="w-full h-full object-cover">
134
+ </div>
135
+ <div class="p-4">
136
+ <h3 class="font-medium text-gray-800 mb-1">Potential match</h3>
137
+ <p class="text-sm text-gray-500 mb-2">social-network.com</p>
138
+ <div class="flex justify-between items-center">
139
+ <span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded">72% match</span>
140
+ <a href="#" class="text-indigo-600 text-sm hover:underline">View source</a>
141
+ </div>
142
+ </div>
143
+ </div>
144
+
145
+ <div class="result-card bg-white rounded-lg overflow-hidden shadow-sm border border-gray-100">
146
+ <div class="h-48 overflow-hidden">
147
+ <img src="https://source.unsplash.com/random/300x200?architecture" alt="Result" class="w-full h-full object-cover">
148
+ </div>
149
+ <div class="p-4">
150
+ <h3 class="font-medium text-gray-800 mb-1">Possible duplicate</h3>
151
+ <p class="text-sm text-gray-500 mb-2">stockphoto.com</p>
152
+ <div class="flex justify-between items-center">
153
+ <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">68% match</span>
154
+ <a href="#" class="text-indigo-600 text-sm hover:underline">View source</a>
155
+ </div>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </div>
160
+
161
+ <!-- Features Section -->
162
+ <div class="max-w-6xl mx-auto mt-16 mb-12">
163
+ <h2 class="text-2xl font-bold text-center text-gray-800 mb-8">Why Use ImageSearch Pro?</h2>
164
+ <div class="grid md:grid-cols-3 gap-8">
165
+ <div class="bg-white p-6 rounded-xl shadow-sm">
166
+ <div class="w-12 h-12 bg-indigo-100 rounded-full flex items-center justify-center mb-4">
167
+ <i class="fas fa-bolt text-indigo-600"></i>
168
+ </div>
169
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">Lightning Fast</h3>
170
+ <p class="text-gray-600">Get results in seconds by searching across multiple engines simultaneously.</p>
171
+ </div>
172
+ <div class="bg-white p-6 rounded-xl shadow-sm">
173
+ <div class="w-12 h-12 bg-indigo-100 rounded-full flex items-center justify-center mb-4">
174
+ <i class="fas fa-shield-alt text-indigo-600"></i>
175
+ </div>
176
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">Privacy Focused</h3>
177
+ <p class="text-gray-600">Your searches are private. We don't store your images or search history.</p>
178
+ </div>
179
+ <div class="bg-white p-6 rounded-xl shadow-sm">
180
+ <div class="w-12 h-12 bg-indigo-100 rounded-full flex items-center justify-center mb-4">
181
+ <i class="fas fa-chart-line text-indigo-600"></i>
182
+ </div>
183
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">Advanced Matching</h3>
184
+ <p class="text-gray-600">Our algorithms find even cropped, edited, or resized versions of your image.</p>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </div>
189
+
190
+ <footer class="bg-gray-100 py-8">
191
+ <div class="container mx-auto px-4 text-center text-gray-500 text-sm">
192
+ <p>© 2023 ImageSearch Pro. All rights reserved.</p>
193
+ <div class="flex justify-center space-x-6 mt-4">
194
+ <a href="#" class="hover:text-indigo-600">Privacy Policy</a>
195
+ <a href="#" class="hover:text-indigo-600">Terms of Service</a>
196
+ <a href="#" class="hover:text-indigo-600">Contact Us</a>
197
+ </div>
198
+ </div>
199
+ </footer>
200
+
201
+ <script>
202
+ // Tab switching
203
+ const uploadTab = document.getElementById('upload-tab');
204
+ const urlTab = document.getElementById('url-tab');
205
+ const uploadSection = document.getElementById('upload-section');
206
+ const urlSection = document.getElementById('url-section');
207
+
208
+ uploadTab.addEventListener('click', () => {
209
+ uploadTab.classList.add('text-indigo-600', 'border-indigo-600');
210
+ uploadTab.classList.remove('text-gray-500');
211
+ urlTab.classList.add('text-gray-500');
212
+ urlTab.classList.remove('text-indigo-600', 'border-indigo-600');
213
+ uploadSection.classList.remove('hidden');
214
+ urlSection.classList.add('hidden');
215
+ });
216
+
217
+ urlTab.addEventListener('click', () => {
218
+ urlTab.classList.add('text-indigo-600', 'border-indigo-600');
219
+ urlTab.classList.remove('text-gray-500');
220
+ uploadTab.classList.add('text-gray-500');
221
+ uploadTab.classList.remove('text-indigo-600', 'border-indigo-600');
222
+ urlSection.classList.remove('hidden');
223
+ uploadSection.classList.add('hidden');
224
+ });
225
+
226
+ // Dropzone functionality
227
+ const dropzone = document.getElementById('dropzone');
228
+ const fileUpload = document.getElementById('file-upload');
229
+
230
+ ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
231
+ dropzone.addEventListener(eventName, preventDefaults, false);
232
+ });
233
+
234
+ function preventDefaults(e) {
235
+ e.preventDefault();
236
+ e.stopPropagation();
237
+ }
238
+
239
+ ['dragenter', 'dragover'].forEach(eventName => {
240
+ dropzone.addEventListener(eventName, highlight, false);
241
+ });
242
+
243
+ ['dragleave', 'drop'].forEach(eventName => {
244
+ dropzone.addEventListener(eventName, unhighlight, false);
245
+ });
246
+
247
+ function highlight() {
248
+ dropzone.classList.add('active');
249
+ }
250
+
251
+ function unhighlight() {
252
+ dropzone.classList.remove('active');
253
+ }
254
+
255
+ dropzone.addEventListener('drop', handleDrop, false);
256
+
257
+ function handleDrop(e) {
258
+ const dt = e.dataTransfer;
259
+ const files = dt.files;
260
+ handleFiles(files);
261
+ }
262
+
263
+ fileUpload.addEventListener('change', function() {
264
+ handleFiles(this.files);
265
+ });
266
+
267
+ function handleFiles(files) {
268
+ if (files.length) {
269
+ const file = files[0];
270
+ if (file.type.match('image.*')) {
271
+ // In a real app, you would upload the file to your server here
272
+ console.log('Image selected:', file.name);
273
+ showResults();
274
+ } else {
275
+ alert('Please select an image file (JPG, PNG, etc.)');
276
+ }
277
+ }
278
+ }
279
+
280
+ // URL search functionality
281
+ const searchUrlBtn = document.getElementById('search-url');
282
+ const imageUrlInput = document.getElementById('image-url');
283
+
284
+ searchUrlBtn.addEventListener('click', () => {
285
+ const url = imageUrlInput.value.trim();
286
+ if (url) {
287
+ // Validate URL (simple check)
288
+ if (url.match(/^https?:\/\/.+\/.+\.(jpg|jpeg|png|gif|webp)(\?.+)?$/i)) {
289
+ console.log('Searching for image at URL:', url);
290
+ showResults();
291
+ } else {
292
+ alert('Please enter a valid image URL (must end with .jpg, .png, etc.)');
293
+ }
294
+ } else {
295
+ alert('Please enter an image URL');
296
+ }
297
+ });
298
+
299
+ // Show results (simulated)
300
+ function showResults() {
301
+ document.getElementById('results-section').classList.remove('hidden');
302
+ window.scrollTo({
303
+ top: document.getElementById('results-section').offsetTop - 20,
304
+ behavior: 'smooth'
305
+ });
306
+ }
307
+
308
+ // New search button
309
+ document.getElementById('new-search').addEventListener('click', () => {
310
+ document.getElementById('results-section').classList.add('hidden');
311
+ fileUpload.value = '';
312
+ imageUrlInput.value = '';
313
+ uploadTab.click();
314
+ });
315
+ </script>
316
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Afantauzzi/reverse-image-space" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
317
+ </html>