Infinity07 commited on
Commit
1f7301d
·
verified ·
1 Parent(s): 49c92e8

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +536 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Ab Tu Dekh 2 O
3
- emoji: 📈
4
- colorFrom: red
5
- colorTo: gray
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: ab-tu-dekh-2-o
3
+ emoji: 🐳
4
+ colorFrom: yellow
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,536 @@
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>CineMatch - Movie Recommender</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
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
11
+
12
+ body {
13
+ font-family: 'Poppins', sans-serif;
14
+ background-color: #0f172a;
15
+ color: #e2e8f0;
16
+ }
17
+
18
+ .movie-card {
19
+ transition: all 0.3s ease;
20
+ transform-style: preserve-3d;
21
+ perspective: 1000px;
22
+ }
23
+
24
+ .movie-card:hover {
25
+ transform: translateY(-10px) scale(1.02);
26
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
27
+ }
28
+
29
+ .movie-poster {
30
+ transition: all 0.5s ease;
31
+ }
32
+
33
+ .movie-poster:hover {
34
+ transform: rotateY(15deg);
35
+ }
36
+
37
+ .genre-chip {
38
+ transition: all 0.2s ease;
39
+ }
40
+
41
+ .genre-chip:hover {
42
+ transform: scale(1.05);
43
+ }
44
+
45
+ .glow {
46
+ box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
47
+ }
48
+
49
+ @keyframes fadeIn {
50
+ from { opacity: 0; transform: translateY(20px); }
51
+ to { opacity: 1; transform: translateY(0); }
52
+ }
53
+
54
+ .fade-in {
55
+ animation: fadeIn 0.5s ease forwards;
56
+ }
57
+ </style>
58
+ </head>
59
+ <body>
60
+ <div class="min-h-screen">
61
+ <!-- Header -->
62
+ <header class="bg-gradient-to-r from-blue-900 to-indigo-900 py-6 px-4 shadow-lg">
63
+ <div class="container mx-auto flex flex-col md:flex-row justify-between items-center">
64
+ <div class="flex items-center mb-4 md:mb-0">
65
+ <i class="fas fa-film text-3xl text-blue-400 mr-3"></i>
66
+ <h1 class="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-300 to-indigo-200">
67
+ CineMatch
68
+ </h1>
69
+ </div>
70
+ <div class="relative w-full md:w-96">
71
+ <input type="text" id="search-input" placeholder="Search for movies..."
72
+ class="w-full py-2 px-4 pr-10 rounded-full bg-gray-800 text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
73
+ <button id="search-btn" class="absolute right-3 top-2 text-gray-400 hover:text-blue-400">
74
+ <i class="fas fa-search"></i>
75
+ </button>
76
+ </div>
77
+ </div>
78
+ </header>
79
+
80
+ <!-- Main Content -->
81
+ <main class="container mx-auto px-4 py-8">
82
+ <!-- Hero Section -->
83
+ <section class="mb-12 text-center">
84
+ <h2 class="text-4xl font-bold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-500">
85
+ Discover Your Next Favorite Movie
86
+ </h2>
87
+ <p class="text-xl text-gray-300 max-w-3xl mx-auto">
88
+ Our AI-powered recommendation system analyzes your preferences to suggest perfect movies tailored just for you.
89
+ </p>
90
+ </section>
91
+
92
+ <!-- Recommendation Controls -->
93
+ <section class="mb-12 bg-gray-800 rounded-xl p-6 shadow-lg">
94
+ <h3 class="text-2xl font-semibold mb-6 text-blue-300 flex items-center">
95
+ <i class="fas fa-sliders-h mr-3"></i> Recommendation Preferences
96
+ </h3>
97
+
98
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
99
+ <!-- Genre Selection -->
100
+ <div class="bg-gray-700 p-4 rounded-lg">
101
+ <h4 class="text-lg font-medium mb-3 text-gray-200">Select Genres</h4>
102
+ <div class="flex flex-wrap gap-2" id="genre-container">
103
+ <!-- Genres will be added here by JavaScript -->
104
+ </div>
105
+ </div>
106
+
107
+ <!-- Decade Selection -->
108
+ <div class="bg-gray-700 p-4 rounded-lg">
109
+ <h4 class="text-lg font-medium mb-3 text-gray-200">Release Decade</h4>
110
+ <div class="flex flex-wrap gap-2">
111
+ <button class="decade-btn px-3 py-1 rounded-full bg-gray-600 hover:bg-blue-600 text-sm" data-decade="2020">2020s</button>
112
+ <button class="decade-btn px-3 py-1 rounded-full bg-gray-600 hover:bg-blue-600 text-sm" data-decade="2010">2010s</button>
113
+ <button class="decade-btn px-3 py-1 rounded-full bg-gray-600 hover:bg-blue-600 text-sm" data-decade="2000">2000s</button>
114
+ <button class="decade-btn px-3 py-1 rounded-full bg-gray-600 hover:bg-blue-600 text-sm" data-decade="1990">1990s</button>
115
+ <button class="decade-btn px-3 py-1 rounded-full bg-gray-600 hover:bg-blue-600 text-sm" data-decade="1980">1980s</button>
116
+ </div>
117
+ </div>
118
+
119
+ <!-- Rating Selection -->
120
+ <div class="bg-gray-700 p-4 rounded-lg">
121
+ <h4 class="text-lg font-medium mb-3 text-gray-200">Minimum Rating</h4>
122
+ <div class="flex items-center">
123
+ <input type="range" id="rating-slider" min="0" max="10" step="0.5" value="7" class="w-full h-2 bg-gray-600 rounded-lg appearance-none cursor-pointer">
124
+ <span id="rating-value" class="ml-3 text-blue-400 font-medium">7.0</span>
125
+ </div>
126
+ </div>
127
+ </div>
128
+
129
+ <div class="mt-6 flex justify-center">
130
+ <button id="recommend-btn" class="px-8 py-3 bg-gradient-to-r from-blue-600 to-indigo-600 rounded-full font-medium hover:from-blue-500 hover:to-indigo-500 transition-all flex items-center">
131
+ <i class="fas fa-magic mr-2"></i> Get Recommendations
132
+ </button>
133
+ </div>
134
+ </section>
135
+
136
+ <!-- Recommendations Section -->
137
+ <section>
138
+ <div class="flex justify-between items-center mb-6">
139
+ <h3 class="text-2xl font-semibold text-blue-300 flex items-center">
140
+ <i class="fas fa-star mr-3"></i> Recommended For You
141
+ </h3>
142
+ <div class="flex items-center">
143
+ <span class="text-sm text-gray-400 mr-2">Sort by:</span>
144
+ <select id="sort-select" class="bg-gray-800 text-white rounded px-3 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500">
145
+ <option value="relevance">Relevance</option>
146
+ <option value="rating">Rating</option>
147
+ <option value="year">Release Year</option>
148
+ <option value="popularity">Popularity</option>
149
+ </select>
150
+ </div>
151
+ </div>
152
+
153
+ <div id="recommendations-container" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
154
+ <!-- Recommendations will be loaded here -->
155
+ <div class="text-center py-10 text-gray-500">
156
+ <i class="fas fa-film text-5xl mb-4 opacity-30"></i>
157
+ <p>Select your preferences and click "Get Recommendations" to see your personalized movie suggestions.</p>
158
+ </div>
159
+ </div>
160
+
161
+ <div class="mt-8 text-center" id="load-more-container">
162
+ <button id="load-more-btn" class="px-6 py-2 border border-blue-500 text-blue-400 rounded-full hover:bg-blue-900 transition-all hidden">
163
+ Load More <i class="fas fa-chevron-down ml-1"></i>
164
+ </button>
165
+ </div>
166
+ </section>
167
+ </main>
168
+
169
+ <!-- Footer -->
170
+ <footer class="bg-gray-900 py-8 px-4 border-t border-gray-800">
171
+ <div class="container mx-auto">
172
+ <div class="flex flex-col md:flex-row justify-between items-center">
173
+ <div class="mb-4 md:mb-0">
174
+ <h2 class="text-xl font-bold text-blue-400 flex items-center">
175
+ <i class="fas fa-film mr-2"></i> CineMatch
176
+ </h2>
177
+ <p class="text-gray-400 text-sm mt-1">Your personal movie recommendation engine</p>
178
+ </div>
179
+ <div class="flex space-x-4">
180
+ <a href="#" class="text-gray-400 hover:text-blue-400"><i class="fab fa-twitter"></i></a>
181
+ <a href="#" class="text-gray-400 hover:text-blue-400"><i class="fab fa-facebook"></i></a>
182
+ <a href="#" class="text-gray-400 hover:text-blue-400"><i class="fab fa-instagram"></i></a>
183
+ <a href="#" class="text-gray-400 hover:text-blue-400"><i class="fab fa-github"></i></a>
184
+ </div>
185
+ </div>
186
+ <div class="mt-6 text-center text-gray-500 text-sm">
187
+ <p>© 2023 CineMatch. All movie data is provided by TMDB API.</p>
188
+ </div>
189
+ </div>
190
+ </footer>
191
+ </div>
192
+
193
+ <script>
194
+ document.addEventListener('DOMContentLoaded', function() {
195
+ // Sample movie data (in a real app, this would come from an API)
196
+ const movieDatabase = [
197
+ {
198
+ id: 1,
199
+ title: "Inception",
200
+ year: 2010,
201
+ rating: 8.8,
202
+ genres: ["Sci-Fi", "Action", "Thriller"],
203
+ poster: "https://image.tmdb.org/t/p/w500/9gk7adHYeDvHkCSEqAvQNLV5Uge.jpg",
204
+ overview: "A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O.",
205
+ popularity: 89.5
206
+ },
207
+ {
208
+ id: 2,
209
+ title: "The Shawshank Redemption",
210
+ year: 1994,
211
+ rating: 9.3,
212
+ genres: ["Drama"],
213
+ poster: "https://image.tmdb.org/t/p/w500/q6y0Go1tsGEsmtFryDOJo3dEmqu.jpg",
214
+ overview: "Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.",
215
+ popularity: 92.1
216
+ },
217
+ {
218
+ id: 3,
219
+ title: "The Dark Knight",
220
+ year: 2008,
221
+ rating: 9.0,
222
+ genres: ["Action", "Crime", "Drama"],
223
+ poster: "https://image.tmdb.org/t/p/w500/qJ2tW6WMUDux911r6m7haRef0WH.jpg",
224
+ overview: "When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, Batman must accept one of the greatest psychological and physical tests of his ability to fight injustice.",
225
+ popularity: 95.3
226
+ },
227
+ {
228
+ id: 4,
229
+ title: "Pulp Fiction",
230
+ year: 1994,
231
+ rating: 8.9,
232
+ genres: ["Crime", "Drama"],
233
+ poster: "https://image.tmdb.org/t/p/w500/d5iIlFn5s0ImszYzBPb8JPIfbXD.jpg",
234
+ overview: "The lives of two mob hitmen, a boxer, a gangster and his wife, and a pair of diner bandits intertwine in four tales of violence and redemption.",
235
+ popularity: 87.2
236
+ },
237
+ {
238
+ id: 5,
239
+ title: "Parasite",
240
+ year: 2019,
241
+ rating: 8.5,
242
+ genres: ["Drama", "Thriller"],
243
+ poster: "https://image.tmdb.org/t/p/w500/7IiTTgloJzvGI1TAYymCfbfl3vT.jpg",
244
+ overview: "Greed and class discrimination threaten the newly formed symbiotic relationship between the wealthy Park family and the destitute Kim clan.",
245
+ popularity: 84.9
246
+ },
247
+ {
248
+ id: 6,
249
+ title: "Interstellar",
250
+ year: 2014,
251
+ rating: 8.6,
252
+ genres: ["Sci-Fi", "Drama"],
253
+ poster: "https://image.tmdb.org/t/p/w500/gEU2QniE6E77NI6lCU6MxlNBvIx.jpg",
254
+ overview: "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.",
255
+ popularity: 88.7
256
+ },
257
+ {
258
+ id: 7,
259
+ title: "The Godfather",
260
+ year: 1972,
261
+ rating: 9.2,
262
+ genres: ["Crime", "Drama"],
263
+ poster: "https://image.tmdb.org/t/p/w500/3bhkrj58Vtu7enYsRolD1fZdja1.jpg",
264
+ overview: "The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant son.",
265
+ popularity: 91.8
266
+ },
267
+ {
268
+ id: 8,
269
+ title: "Fight Club",
270
+ year: 1999,
271
+ rating: 8.8,
272
+ genres: ["Drama"],
273
+ poster: "https://image.tmdb.org/t/p/w500/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg",
274
+ overview: "An insomniac office worker and a devil-may-care soapmaker form an underground fight club that evolves into something much, much more.",
275
+ popularity: 86.4
276
+ }
277
+ ];
278
+
279
+ // All available genres from our sample data
280
+ const allGenres = [...new Set(movieDatabase.flatMap(movie => movie.genres))];
281
+
282
+ // DOM elements
283
+ const genreContainer = document.getElementById('genre-container');
284
+ const recommendBtn = document.getElementById('recommend-btn');
285
+ const recommendationsContainer = document.getElementById('recommendations-container');
286
+ const ratingSlider = document.getElementById('rating-slider');
287
+ const ratingValue = document.getElementById('rating-value');
288
+ const decadeBtns = document.querySelectorAll('.decade-btn');
289
+ const sortSelect = document.getElementById('sort-select');
290
+ const loadMoreBtn = document.getElementById('load-more-btn');
291
+ const searchInput = document.getElementById('search-input');
292
+ const searchBtn = document.getElementById('search-btn');
293
+
294
+ // State
295
+ let selectedGenres = [];
296
+ let selectedDecade = null;
297
+ let currentMinRating = 7;
298
+ let currentSort = 'relevance';
299
+ let currentPage = 1;
300
+ let moviesPerPage = 4;
301
+ let currentSearchTerm = '';
302
+
303
+ // Initialize the app
304
+ function init() {
305
+ renderGenreButtons();
306
+ setupEventListeners();
307
+ updateRatingDisplay();
308
+ }
309
+
310
+ // Render genre selection buttons
311
+ function renderGenreButtons() {
312
+ genreContainer.innerHTML = '';
313
+ allGenres.forEach(genre => {
314
+ const button = document.createElement('button');
315
+ button.className = 'genre-chip px-3 py-1 rounded-full bg-gray-600 hover:bg-blue-600 text-sm';
316
+ button.textContent = genre;
317
+ button.dataset.genre = genre;
318
+ genreContainer.appendChild(button);
319
+ });
320
+ }
321
+
322
+ // Set up event listeners
323
+ function setupEventListeners() {
324
+ // Genre selection
325
+ genreContainer.addEventListener('click', function(e) {
326
+ if (e.target.classList.contains('genre-chip')) {
327
+ const genre = e.target.dataset.genre;
328
+ if (selectedGenres.includes(genre)) {
329
+ selectedGenres = selectedGenres.filter(g => g !== genre);
330
+ e.target.classList.remove('bg-blue-600', 'glow');
331
+ e.target.classList.add('bg-gray-600');
332
+ } else {
333
+ selectedGenres.push(genre);
334
+ e.target.classList.remove('bg-gray-600');
335
+ e.target.classList.add('bg-blue-600', 'glow');
336
+ }
337
+ }
338
+ });
339
+
340
+ // Decade selection
341
+ decadeBtns.forEach(btn => {
342
+ btn.addEventListener('click', function() {
343
+ if (selectedDecade === this.dataset.decade) {
344
+ selectedDecade = null;
345
+ this.classList.remove('bg-blue-600', 'glow');
346
+ this.classList.add('bg-gray-600');
347
+ } else {
348
+ selectedDecade = this.dataset.decade;
349
+ decadeBtns.forEach(b => {
350
+ b.classList.remove('bg-blue-600', 'glow');
351
+ b.classList.add('bg-gray-600');
352
+ });
353
+ this.classList.remove('bg-gray-600');
354
+ this.classList.add('bg-blue-600', 'glow');
355
+ }
356
+ });
357
+ });
358
+
359
+ // Rating slider
360
+ ratingSlider.addEventListener('input', function() {
361
+ currentMinRating = parseFloat(this.value);
362
+ updateRatingDisplay();
363
+ });
364
+
365
+ // Recommend button
366
+ recommendBtn.addEventListener('click', function() {
367
+ currentPage = 1;
368
+ getRecommendations();
369
+ });
370
+
371
+ // Sort selection
372
+ sortSelect.addEventListener('change', function() {
373
+ currentSort = this.value;
374
+ getRecommendations();
375
+ });
376
+
377
+ // Load more button
378
+ loadMoreBtn.addEventListener('click', function() {
379
+ currentPage++;
380
+ getRecommendations(true);
381
+ });
382
+
383
+ // Search functionality
384
+ searchBtn.addEventListener('click', function() {
385
+ currentSearchTerm = searchInput.value.trim();
386
+ currentPage = 1;
387
+ getRecommendations();
388
+ });
389
+
390
+ searchInput.addEventListener('keypress', function(e) {
391
+ if (e.key === 'Enter') {
392
+ currentSearchTerm = searchInput.value.trim();
393
+ currentPage = 1;
394
+ getRecommendations();
395
+ }
396
+ });
397
+ }
398
+
399
+ // Update rating display
400
+ function updateRatingDisplay() {
401
+ ratingValue.textContent = currentMinRating.toFixed(1);
402
+ }
403
+
404
+ // Get recommendations based on current filters
405
+ function getRecommendations(append = false) {
406
+ // Filter movies based on selected criteria
407
+ let filteredMovies = [...movieDatabase];
408
+
409
+ // Apply genre filter if any genres selected
410
+ if (selectedGenres.length > 0) {
411
+ filteredMovies = filteredMovies.filter(movie =>
412
+ movie.genres.some(genre => selectedGenres.includes(genre))
413
+ );
414
+ }
415
+
416
+ // Apply decade filter if selected
417
+ if (selectedDecade) {
418
+ const decadeStart = parseInt(selectedDecade);
419
+ const decadeEnd = decadeStart + 9;
420
+ filteredMovies = filteredMovies.filter(movie =>
421
+ movie.year >= decadeStart && movie.year <= decadeEnd
422
+ );
423
+ }
424
+
425
+ // Apply rating filter
426
+ filteredMovies = filteredMovies.filter(movie =>
427
+ movie.rating >= currentMinRating
428
+ );
429
+
430
+ // Apply search filter if there's a search term
431
+ if (currentSearchTerm) {
432
+ const searchTerm = currentSearchTerm.toLowerCase();
433
+ filteredMovies = filteredMovies.filter(movie =>
434
+ movie.title.toLowerCase().includes(searchTerm) ||
435
+ movie.overview.toLowerCase().includes(searchTerm)
436
+ );
437
+ }
438
+
439
+ // Sort movies based on current sort option
440
+ switch (currentSort) {
441
+ case 'rating':
442
+ filteredMovies.sort((a, b) => b.rating - a.rating);
443
+ break;
444
+ case 'year':
445
+ filteredMovies.sort((a, b) => b.year - a.year);
446
+ break;
447
+ case 'popularity':
448
+ filteredMovies.sort((a, b) => b.popularity - a.popularity);
449
+ break;
450
+ default: // 'relevance'
451
+ // In a real app, this would use a more sophisticated algorithm
452
+ filteredMovies.sort((a, b) => {
453
+ // Simple relevance score based on rating and popularity
454
+ const scoreA = (a.rating * 0.7) + (a.popularity * 0.3);
455
+ const scoreB = (b.rating * 0.7) + (b.popularity * 0.3);
456
+ return scoreB - scoreA;
457
+ });
458
+ }
459
+
460
+ // Pagination
461
+ const startIdx = (currentPage - 1) * moviesPerPage;
462
+ const endIdx = startIdx + moviesPerPage;
463
+ const paginatedMovies = filteredMovies.slice(0, endIdx);
464
+
465
+ // Show/hide load more button
466
+ if (filteredMovies.length > endIdx) {
467
+ loadMoreBtn.classList.remove('hidden');
468
+ } else {
469
+ loadMoreBtn.classList.add('hidden');
470
+ }
471
+
472
+ // Render recommendations
473
+ if (append) {
474
+ renderMovies(paginatedMovies, true);
475
+ } else {
476
+ renderMovies(paginatedMovies);
477
+ }
478
+ }
479
+
480
+ // Render movies to the UI
481
+ function renderMovies(movies, append = false) {
482
+ if (!append) {
483
+ recommendationsContainer.innerHTML = '';
484
+
485
+ if (movies.length === 0) {
486
+ const noResults = document.createElement('div');
487
+ noResults.className = 'text-center py-10 text-gray-500 col-span-full';
488
+ noResults.innerHTML = `
489
+ <i class="fas fa-film text-5xl mb-4 opacity-30"></i>
490
+ <p>No movies match your criteria. Try adjusting your filters.</p>
491
+ `;
492
+ recommendationsContainer.appendChild(noResults);
493
+ loadMoreBtn.classList.add('hidden');
494
+ return;
495
+ }
496
+ }
497
+
498
+ movies.slice((currentPage - 1) * moviesPerPage).forEach((movie, index) => {
499
+ const movieCard = document.createElement('div');
500
+ movieCard.className = `movie-card bg-gray-800 rounded-lg overflow-hidden shadow-lg fade-in`;
501
+ movieCard.style.animationDelay = `${index * 0.1}s`;
502
+
503
+ movieCard.innerHTML = `
504
+ <div class="relative">
505
+ <img src="${movie.poster}" alt="${movie.title}" class="w-full h-80 object-cover movie-poster">
506
+ <div class="absolute top-2 right-2 bg-blue-600 text-white text-xs font-bold px-2 py-1 rounded">
507
+ ${movie.rating.toFixed(1)}
508
+ </div>
509
+ </div>
510
+ <div class="p-4">
511
+ <h3 class="text-xl font-semibold mb-1">${movie.title}</h3>
512
+ <div class="flex justify-between items-center text-sm text-gray-400 mb-3">
513
+ <span>${movie.year}</span>
514
+ <div class="flex space-x-1">
515
+ ${movie.genres.map(genre =>
516
+ `<span class="px-2 py-1 bg-gray-700 rounded-full text-xs">${genre}</span>`
517
+ ).join('')}
518
+ </div>
519
+ </div>
520
+ <p class="text-gray-300 text-sm mb-4 line-clamp-3">${movie.overview}</p>
521
+ <button class="w-full py-2 bg-blue-600 hover:bg-blue-700 rounded text-sm font-medium transition-colors">
522
+ <i class="fas fa-plus mr-1"></i> Add to Watchlist
523
+ </button>
524
+ </div>
525
+ `;
526
+
527
+ recommendationsContainer.appendChild(movieCard);
528
+ });
529
+ }
530
+
531
+ // Initialize the app
532
+ init();
533
+ });
534
+ </script>
535
+ <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=Infinity07/ab-tu-dekh-2-o" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
536
+ </html>
prompts.txt ADDED
File without changes