iammrrobot420 commited on
Commit
3d4860e
·
verified ·
1 Parent(s): f45c655

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +218 -19
index.html CHANGED
@@ -1,19 +1,218 @@
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>Photo Enhancer Pro</title>
7
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
8
+ <style>
9
+ :root {
10
+ --primary: #2c3e50;
11
+ --secondary: #3498db;
12
+ }
13
+
14
+ * {
15
+ box-sizing: border-box;
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+
20
+ body {
21
+ font-family: 'Segoe UI', system-ui;
22
+ min-height: 100vh;
23
+ background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
24
+ }
25
+
26
+ .header {
27
+ background: var(--primary);
28
+ color: white;
29
+ padding: 1rem;
30
+ text-align: center;
31
+ display: flex;
32
+ justify-content: space-between;
33
+ align-items: center;
34
+ }
35
+
36
+ .brand {
37
+ font-size: 1.5rem;
38
+ font-weight: bold;
39
+ }
40
+
41
+ .anycoder-link {
42
+ color: white;
43
+ text-decoration: none;
44
+ font-size: 0.9rem;
45
+ }
46
+
47
+ .container {
48
+ max-width: 1200px;
49
+ margin: 2rem auto;
50
+ padding: 1rem;
51
+ }
52
+
53
+ .upload-section {
54
+ background: white;
55
+ border-radius: 15px;
56
+ padding: 2rem;
57
+ box-shadow: 0 10px 30px rgba(0,0,0,0.1);
58
+ text-align: center;
59
+ }
60
+
61
+ .drag-drop-area {
62
+ border: 2px dashed var(--secondary);
63
+ border-radius: 10px;
64
+ padding: 3rem 1rem;
65
+ margin: 1rem 0;
66
+ cursor: pointer;
67
+ transition: all 0.3s ease;
68
+ }
69
+
70
+ .drag-drop-area:hover {
71
+ background: #f8f9fa;
72
+ transform: translateY(-2px);
73
+ }
74
+
75
+ #fileInput {
76
+ display: none;
77
+ }
78
+
79
+ .options {
80
+ display: grid;
81
+ gap: 1rem;
82
+ margin: 2rem 0;
83
+ }
84
+
85
+ button {
86
+ background: var(--secondary);
87
+ color: white;
88
+ border: none;
89
+ padding: 1rem 2rem;
90
+ border-radius: 8px;
91
+ cursor: pointer;
92
+ transition: all 0.3s ease;
93
+ font-size: 1rem;
94
+ }
95
+
96
+ button:hover {
97
+ opacity: 0.9;
98
+ transform: scale(1.02);
99
+ }
100
+
101
+ .result-section {
102
+ margin-top: 2rem;
103
+ display: none;
104
+ }
105
+
106
+ .image-comparison {
107
+ display: grid;
108
+ grid-template-columns: 1fr 1fr;
109
+ gap: 2rem;
110
+ margin-top: 2rem;
111
+ }
112
+
113
+ .image-box {
114
+ position: relative;
115
+ border-radius: 10px;
116
+ overflow: hidden;
117
+ box-shadow: 0 5px 15px rgba(0,0,0,0.1);
118
+ }
119
+
120
+ .image-box img {
121
+ width: 100%;
122
+ height: auto;
123
+ display: block;
124
+ }
125
+
126
+ @media (max-width: 768px) {
127
+ .image-comparison {
128
+ grid-template-columns: 1fr;
129
+ }
130
+
131
+ .container {
132
+ margin: 1rem;
133
+ }
134
+ }
135
+ </style>
136
+ </head>
137
+ <body>
138
+ <header class="header">
139
+ <div class="brand">Photo Enhancer Pro</div>
140
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="anycoder-link">Built with anycoder</a>
141
+ </header>
142
+
143
+ <div class="container">
144
+ <div class="upload-section">
145
+ <h2>Upload Photo for Enhancement</h2>
146
+ <div class="drag-drop-area" onclick="document.getElementById('fileInput').click()">
147
+ <i class="fas fa-cloud-upload-alt fa-3x"></i>
148
+ <p>Click to upload or drag and drop</p>
149
+ </div>
150
+ <input type="file" id="fileInput" accept="image/*">
151
+
152
+ <div class="options">
153
+ <button onclick="applyEnhancement('color')">
154
+ <i class="fas fa-palette"></i> Adjust Colors
155
+ </button>
156
+ <button onclick="applyEnhancement('background')">
157
+ <i class="fas fa-image"></i> Improve Background
158
+ </button>
159
+ <button onclick="applyEnhancement('lighting')">
160
+ <i class="fas fa-sun"></i> Optimize Lighting
161
+ </button>
162
+ </div>
163
+ </div>
164
+
165
+ <div class="result-section" id="resultSection">
166
+ <h3>Enhanced Result</h3>
167
+ <div class="image-comparison">
168
+ <div class="image-box">
169
+ <h4>Original</h4>
170
+ <img id="originalImage" alt="Original">
171
+ </div>
172
+ <div class="image-box">
173
+ <h4>Enhanced</h4>
174
+ <img id="enhancedImage" alt="Enhanced">
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+ <script>
181
+ const fileInput = document.getElementById('fileInput');
182
+ const resultSection = document.getElementById('resultSection');
183
+
184
+ fileInput.addEventListener('change', function(e) {
185
+ const file = e.target.files[0];
186
+ if (file) {
187
+ const reader = new FileReader();
188
+ reader.onload = function(event) {
189
+ document.getElementById('originalImage').src = event.target.result;
190
+ resultSection.style.display = 'block';
191
+ }
192
+ reader.readAsDataURL(file);
193
+ }
194
+ });
195
+
196
+ function applyEnhancement(type) {
197
+ // Demo enhancement - would be replaced with actual processing
198
+ const original = document.getElementById('originalImage').src;
199
+ document.getElementById('enhancedImage').src = original;
200
+ alert(`Applying ${type} enhancement... (demo)`);
201
+ }
202
+
203
+ // Drag and drop functionality
204
+ document.addEventListener('dragover', (e) => {
205
+ e.preventDefault();
206
+ });
207
+
208
+ document.addEventListener('drop', (e) => {
209
+ e.preventDefault();
210
+ const file = e.dataTransfer.files[0];
211
+ if (file && file.type.startsWith('image/')) {
212
+ fileInput.files = e.dataTransfer.files;
213
+ fileInput.dispatchEvent(new Event('change'));
214
+ }
215
+ });
216
+ </script>
217
+ </body>
218
+ </html>