sajjadmamun commited on
Commit
9da0df5
·
verified ·
1 Parent(s): 53e534c

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +114 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Ai Prompt Generator
3
- emoji: 😻
4
  colorFrom: purple
5
- colorTo: purple
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: ai-prompt-generator
3
+ emoji: 🐳
4
  colorFrom: purple
5
+ colorTo: red
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,114 @@
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>Image to AI Prompt Generator</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 #9CA3AF;
12
+ transition: all 0.3s ease;
13
+ }
14
+ .dropzone.active {
15
+ border-color: #3B82F6;
16
+ background-color: #EFF6FF;
17
+ }
18
+ .prompt-card {
19
+ background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
20
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
21
+ transition: all 0.3s ease;
22
+ }
23
+ .prompt-card:hover {
24
+ transform: translateY(-2px);
25
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
26
+ }
27
+ .loading-spinner {
28
+ animation: spin 1s linear infinite;
29
+ }
30
+ @keyframes spin {
31
+ 0% { transform: rotate(0deg); }
32
+ 100% { transform: rotate(360deg); }
33
+ }
34
+ .image-preview {
35
+ max-height: 300px;
36
+ object-fit: contain;
37
+ }
38
+ </style>
39
+ </head>
40
+ <body class="bg-gray-50 min-h-screen">
41
+ <div class="container mx-auto px-4 py-12">
42
+ <div class="text-center mb-12">
43
+ <h1 class="text-4xl font-bold text-gray-800 mb-3">AI Prompt Generator</h1>
44
+ <p class="text-xl text-gray-600 max-w-2xl mx-auto">
45
+ Upload any image and get creative AI prompts that describe it perfectly. Perfect for artists, writers, and content creators!
46
+ </p>
47
+ </div>
48
+
49
+ <div class="max-w-3xl mx-auto bg-white rounded-xl shadow-md overflow-hidden p-6 mb-12">
50
+ <div id="upload-section" class="text-center">
51
+ <div id="dropzone" class="dropzone rounded-lg p-12 cursor-pointer mb-6">
52
+ <div class="flex flex-col items-center justify-center">
53
+ <i class="fas fa-cloud-upload-alt text-4xl text-blue-500 mb-4"></i>
54
+ <h3 class="text-xl font-semibold text-gray-700 mb-2">Drag & Drop your image here</h3>
55
+ <p class="text-gray-500 mb-4">or</p>
56
+ <label for="file-upload" class="px-6 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition cursor-pointer">
57
+ Browse Files
58
+ </label>
59
+ <input id="file-upload" type="file" accept="image/*" class="hidden">
60
+ </div>
61
+ </div>
62
+ <div id="image-preview-container" class="hidden mb-6">
63
+ <div class="flex justify-center mb-4">
64
+ <img id="image-preview" class="image-preview rounded-lg shadow-md" src="" alt="Preview">
65
+ </div>
66
+ <button id="generate-btn" class="px-8 py-3 bg-gradient-to-r from-blue-500 to-purple-600 text-white rounded-lg font-semibold hover:opacity-90 transition flex items-center mx-auto">
67
+ <i class="fas fa-magic mr-2"></i> Generate AI Prompts
68
+ </button>
69
+ </div>
70
+ <div id="loading" class="hidden py-8">
71
+ <div class="flex flex-col items-center">
72
+ <div class="loading-spinner w-12 h-12 border-4 border-blue-500 border-t-transparent rounded-full mb-4"></div>
73
+ <p class="text-gray-700">Analyzing your image and generating creative prompts...</p>
74
+ </div>
75
+ </div>
76
+ </div>
77
+
78
+ <div id="results-section" class="hidden">
79
+ <div class="flex justify-between items-center mb-6">
80
+ <h2 class="text-2xl font-bold text-gray-800">Generated Prompts</h2>
81
+ <button id="new-upload" class="text-blue-500 hover:text-blue-700 flex items-center">
82
+ <i class="fas fa-upload mr-2"></i> Upload New Image
83
+ </button>
84
+ </div>
85
+
86
+ <div id="prompts-container" class="space-y-4">
87
+ <!-- Prompts will be inserted here -->
88
+ </div>
89
+
90
+ <div class="mt-8 pt-6 border-t border-gray-200">
91
+ <h3 class="text-lg font-semibold text-gray-700 mb-4">Need variations?</h3>
92
+ <div class="flex space-x-3">
93
+ <button id="regenerate-btn" class="px-6 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition flex items-center">
94
+ <i class="fas fa-sync-alt mr-2"></i> Regenerate
95
+ </button>
96
+ <button id="enhance-btn" class="px-6 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition flex items-center">
97
+ <i class="fas fa-plus-circle mr-2"></i> Enhance Prompts
98
+ </button>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </div>
103
+
104
+ <div class="max-w-3xl mx-auto text-center text-gray-500 text-sm">
105
+ <p>This tool helps artists, writers, and content creators generate detailed AI prompts from images. Use these prompts for AI image generation, creative writing, or artistic inspiration.</p>
106
+ </div>
107
+ </div>
108
+
109
+ <script>
110
+ document.addEventListener('DOMContentLoaded', function() {
111
+ const dropzone = document.getElementById('dropzone');
112
+ const fileInput = document.getElementById('file-upload');
113
+ const imagePreview
114
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Upload any image and get creative AI prompts that describe it the image perfectly. Perfect for artists, writers, content creators and Ai image generator.!