nihatcan42 commited on
Commit
6590e5d
·
verified ·
1 Parent(s): 6ac3b50

Kanka selamlar, Bana URL/Yüklenen Dosya'daki fotoğraf'ın tüm detaylı prompt'unu hem prompt hem de json prompt halinde istemlerini kusursuzca bir mühendis gibi çıkaran text haline getiren bir site

Browse files
Files changed (2) hide show
  1. README.md +8 -5
  2. index.html +285 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Prompt Analyzer Pro
3
- emoji: 🌖
4
- colorFrom: purple
5
- colorTo: red
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: Prompt Analyzer Pro 📸
3
+ colorFrom: green
4
+ colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).
index.html CHANGED
@@ -1,19 +1,286 @@
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>Prompt Analyzer Pro</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <style>
11
+ .gradient-bg {
12
+ background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
13
+ }
14
+ .dropzone {
15
+ border: 2px dashed #a777e3;
16
+ transition: all 0.3s ease;
17
+ }
18
+ .dropzone-active {
19
+ border-color: #6e8efb;
20
+ background-color: rgba(110, 142, 251, 0.1);
21
+ }
22
+ .prompt-card {
23
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
24
+ }
25
+ .prompt-card:hover {
26
+ transform: translateY(-5px);
27
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
28
+ }
29
+ </style>
30
+ </head>
31
+ <body class="min-h-screen bg-gray-50">
32
+ <!-- Header -->
33
+ <header class="gradient-bg text-white shadow-lg">
34
+ <div class="container mx-auto px-4 py-6">
35
+ <div class="flex flex-col md:flex-row justify-between items-center">
36
+ <div class="flex items-center mb-4 md:mb-0">
37
+ <i data-feather="camera" class="w-8 h-8 mr-2"></i>
38
+ <h1 class="text-2xl font-bold">Prompt Analyzer Pro</h1>
39
+ </div>
40
+ <nav class="flex space-x-6">
41
+ <a href="#" class="hover:text-gray-200 font-medium">Home</a>
42
+ <a href="#" class="hover:text-gray-200 font-medium">How It Works</a>
43
+ <a href="#" class="hover:text-gray-200 font-medium">API</a>
44
+ </nav>
45
+ </div>
46
+ </div>
47
+ </header>
48
+
49
+ <!-- Hero Section -->
50
+ <section class="gradient-bg text-white py-16">
51
+ <div class="container mx-auto px-4 text-center">
52
+ <h2 class="text-4xl font-bold mb-4">Extract Perfect Prompts from Any Image</h2>
53
+ <p class="text-xl mb-8 max-w-2xl mx-auto">Upload an image or paste a URL to get detailed prompt analysis in both human-readable and JSON formats.</p>
54
+ <div class="max-w-2xl mx-auto bg-white rounded-lg shadow-xl overflow-hidden">
55
+ <div class="p-1 gradient-bg">
56
+ <div class="bg-white p-4 rounded">
57
+ <div id="dropzone" class="dropzone rounded-lg p-8 text-center cursor-pointer">
58
+ <i data-feather="upload-cloud" class="w-12 h-12 mx-auto text-purple-500 mb-4"></i>
59
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">Drag & Drop Image Here</h3>
60
+ <p class="text-gray-600 mb-4">or click to browse files</p>
61
+ <input type="file" id="fileInput" class="hidden" accept="image/*">
62
+ <input type="text" id="urlInput" placeholder="Or paste image URL here" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500">
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </section>
69
+
70
+ <!-- Features Section -->
71
+ <section class="py-16 bg-white">
72
+ <div class="container mx-auto px-4">
73
+ <div class="text-center mb-12">
74
+ <h2 class="text-3xl font-bold text-gray-800 mb-4">Powerful Prompt Analysis</h2>
75
+ <p class="text-gray-600 max-w-2xl mx-auto">Our AI extracts comprehensive metadata and generates perfect prompts for AI image generation.</p>
76
+ </div>
77
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
78
+ <div class="prompt-card bg-gray-50 p-6 rounded-xl">
79
+ <div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center mb-4">
80
+ <i data-feather="file-text" class="w-6 h-6 text-white"></i>
81
+ </div>
82
+ <h3 class="text-xl font-semibold mb-2 text-gray-800">Detailed Text Prompt</h3>
83
+ <p class="text-gray-600">Get a comprehensive, human-readable description of all image elements.</p>
84
+ </div>
85
+ <div class="prompt-card bg-gray-50 p-6 rounded-xl">
86
+ <div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center mb-4">
87
+ <i data-feather="code" class="w-6 h-6 text-white"></i>
88
+ </div>
89
+ <h3 class="text-xl font-semibold mb-2 text-gray-800">Structured JSON Data</h3>
90
+ <p class="text-gray-600">Receive machine-readable metadata in perfect JSON format.</p>
91
+ </div>
92
+ <div class="prompt-card bg-gray-50 p-6 rounded-xl">
93
+ <div class="w-12 h-12 gradient-bg rounded-full flex items-center justify-center mb-4">
94
+ <i data-feather="zap" class="w-6 h-6 text-white"></i>
95
+ </div>
96
+ <h3 class="text-xl font-semibold mb-2 text-gray-800">Instant Results</h3>
97
+ <p class="text-gray-600">Analyze images in seconds with our optimized AI pipeline.</p>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </section>
102
+
103
+ <!-- Results Section -->
104
+ <section class="py-16 bg-gray-50">
105
+ <div class="container mx-auto px-4">
106
+ <h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Example Analysis Output</h2>
107
+
108
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
109
+ <!-- Text Prompt Card -->
110
+ <div class="prompt-card bg-white p-6 rounded-xl shadow-md">
111
+ <div class="flex items-center mb-4">
112
+ <i data-feather="file-text" class="w-6 h-6 text-purple-500 mr-2"></i>
113
+ <h3 class="text-xl font-semibold text-gray-800">Text Prompt</h3>
114
+ </div>
115
+ <div class="bg-gray-50 p-4 rounded-lg">
116
+ <pre class="text-gray-800 whitespace-pre-wrap font-mono text-sm">A serene landscape at sunset featuring a calm lake reflecting the vibrant colors of the sky, surrounded by lush green pine trees. In the foreground, a wooden dock extends into the water with a red canoe tied to it. The scene has warm golden hour lighting with soft clouds partially covering the sun. The composition is cinematic with a shallow depth of field, shot on a professional DSLR camera with a 50mm lens.</pre>
117
+ </div>
118
+ <button class="mt-4 gradient-bg text-white px-4 py-2 rounded-lg hover:opacity-90 transition flex items-center">
119
+ <i data-feather="copy" class="w-4 h-4 mr-2"></i>
120
+ Copy Prompt
121
+ </button>
122
+ </div>
123
+
124
+ <!-- JSON Prompt Card -->
125
+ <div class="prompt-card bg-white p-6 rounded-xl shadow-md">
126
+ <div class="flex items-center mb-4">
127
+ <i data-feather="code" class="w-6 h-6 text-purple-500 mr-2"></i>
128
+ <h3 class="text-xl font-semibold text-gray-800">JSON Metadata</h3>
129
+ </div>
130
+ <div class="bg-gray-50 p-4 rounded-lg overflow-x-auto">
131
+ <pre class="text-gray-800 whitespace-pre-wrap font-mono text-sm">{
132
+ "scene": "serene landscape at sunset",
133
+ "elements": {
134
+ "main_subject": "calm lake",
135
+ "secondary_elements": ["pine trees", "wooden dock", "red canoe"],
136
+ "foreground": "dock with canoe",
137
+ "background": "sky and trees"
138
+ },
139
+ "lighting": {
140
+ "type": "golden hour",
141
+ "quality": "warm and soft",
142
+ "direction": "side lighting"
143
+ },
144
+ "composition": {
145
+ "style": "cinematic",
146
+ "depth_of_field": "shallow",
147
+ "focal_length": "50mm"
148
+ },
149
+ "technical": {
150
+ "camera": "professional DSLR",
151
+ "lens": "50mm prime",
152
+ "aperture": "f/1.8",
153
+ "iso": "100",
154
+ "shutter_speed": "1/200s"
155
+ },
156
+ "mood": "peaceful, serene, nostalgic",
157
+ "color_palette": ["golden", "orange", "green", "blue"]
158
+ }</pre>
159
+ </div>
160
+ <button class="mt-4 gradient-bg text-white px-4 py-2 rounded-lg hover:opacity-90 transition flex items-center">
161
+ <i data-feather="copy" class="w-4 h-4 mr-2"></i>
162
+ Copy JSON
163
+ </button>
164
+ </div>
165
+ </div>
166
+ </div>
167
+ </section>
168
+
169
+ <!-- Footer -->
170
+ <footer class="bg-gray-800 text-white py-8">
171
+ <div class="container mx-auto px-4">
172
+ <div class="flex flex-col md:flex-row justify-between items-center">
173
+ <div class="mb-4 md:mb-0">
174
+ <div class="flex items-center">
175
+ <i data-feather="camera" class="w-6 h-6 mr-2"></i>
176
+ <span class="text-xl font-bold">Prompt Analyzer Pro</span>
177
+ </div>
178
+ <p class="text-gray-400 mt-2">Extracting perfection from every pixel.</p>
179
+ </div>
180
+ <div class="flex space-x-6">
181
+ <a href="#" class="text-gray-400 hover:text-white">
182
+ <i data-feather="github"></i>
183
+ </a>
184
+ <a href="#" class="text-gray-400 hover:text-white">
185
+ <i data-feather="twitter"></i>
186
+ </a>
187
+ <a href="#" class="text-gray-400 hover:text-white">
188
+ <i data-feather="linkedin"></i>
189
+ </a>
190
+ </div>
191
+ </div>
192
+ <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
193
+ <p>&copy; 2023 Prompt Analyzer Pro. All rights reserved.</p>
194
+ </div>
195
+ </div>
196
+ </footer>
197
+
198
+ <script>
199
+ // Initialize feather icons
200
+ feather.replace();
201
+
202
+ // Dropzone functionality
203
+ const dropzone = document.getElementById('dropzone');
204
+ const fileInput = document.getElementById('fileInput');
205
+
206
+ dropzone.addEventListener('click', () => {
207
+ fileInput.click();
208
+ });
209
+
210
+ ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
211
+ dropzone.addEventListener(eventName, preventDefaults, false);
212
+ });
213
+
214
+ function preventDefaults(e) {
215
+ e.preventDefault();
216
+ e.stopPropagation();
217
+ }
218
+
219
+ ['dragenter', 'dragover'].forEach(eventName => {
220
+ dropzone.addEventListener(eventName, highlight, false);
221
+ });
222
+
223
+ ['dragleave', 'drop'].forEach(eventName => {
224
+ dropzone.addEventListener(eventName, unhighlight, false);
225
+ });
226
+
227
+ function highlight() {
228
+ dropzone.classList.add('dropzone-active');
229
+ }
230
+
231
+ function unhighlight() {
232
+ dropzone.classList.remove('dropzone-active');
233
+ }
234
+
235
+ dropzone.addEventListener('drop', handleDrop, false);
236
+
237
+ function handleDrop(e) {
238
+ const dt = e.dataTransfer;
239
+ const files = dt.files;
240
+ handleFiles(files);
241
+ }
242
+
243
+ fileInput.addEventListener('change', function() {
244
+ handleFiles(this.files);
245
+ });
246
+
247
+ function handleFiles(files) {
248
+ if (files.length) {
249
+ const file = files[0];
250
+ if (file.type.match('image.*')) {
251
+ // Here you would process the file
252
+ console.log('Image file selected:', file.name);
253
+ // In a real app, you would upload and process the image here
254
+ } else {
255
+ alert('Please select an image file.');
256
+ }
257
+ }
258
+ }
259
+
260
+ // URL input handling
261
+ const urlInput = document.getElementById('urlInput');
262
+ urlInput.addEventListener('keypress', function(e) {
263
+ if (e.key === 'Enter') {
264
+ const url = this.value.trim();
265
+ if (url) {
266
+ if (isValidHttpUrl(url)) {
267
+ console.log('Processing URL:', url);
268
+ // In a real app, you would fetch and process the image from URL here
269
+ } else {
270
+ alert('Please enter a valid HTTP/HTTPS URL');
271
+ }
272
+ }
273
+ }
274
+ });
275
+
276
+ function isValidHttpUrl(string) {
277
+ try {
278
+ const url = new URL(string);
279
+ return url.protocol === "http:" || url.protocol === "https:";
280
+ } catch (_) {
281
+ return false;
282
+ }
283
+ }
284
+ </script>
285
+ </body>
286
  </html>