Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +338 -19
- prompts.txt +1 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
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: privatedev1
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: purple
|
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,338 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>Unicorn Bedtime Stories</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: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
15 |
+
min-height: 100vh;
|
16 |
+
}
|
17 |
+
|
18 |
+
.unicorn-bg {
|
19 |
+
background: linear-gradient(to bottom right, #a78bfa, #c084fc, #e879f9);
|
20 |
+
}
|
21 |
+
|
22 |
+
.story-card {
|
23 |
+
background: rgba(255, 255, 255, 0.9);
|
24 |
+
backdrop-filter: blur(10px);
|
25 |
+
border-radius: 20px;
|
26 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
27 |
+
transition: all 0.3s ease;
|
28 |
+
}
|
29 |
+
|
30 |
+
.story-card:hover {
|
31 |
+
transform: translateY(-5px);
|
32 |
+
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
|
33 |
+
}
|
34 |
+
|
35 |
+
.btn-magic {
|
36 |
+
background: linear-gradient(to right, #8b5cf6, #d946ef);
|
37 |
+
color: white;
|
38 |
+
transition: all 0.3s ease;
|
39 |
+
}
|
40 |
+
|
41 |
+
.btn-magic:hover {
|
42 |
+
transform: scale(1.05);
|
43 |
+
box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
|
44 |
+
}
|
45 |
+
|
46 |
+
.unicorn-icon {
|
47 |
+
animation: float 3s ease-in-out infinite;
|
48 |
+
}
|
49 |
+
|
50 |
+
@keyframes float {
|
51 |
+
0% { transform: translateY(0px); }
|
52 |
+
50% { transform: translateY(-10px); }
|
53 |
+
100% { transform: translateY(0px); }
|
54 |
+
}
|
55 |
+
|
56 |
+
.stars {
|
57 |
+
position: absolute;
|
58 |
+
width: 100%;
|
59 |
+
height: 100%;
|
60 |
+
top: 0;
|
61 |
+
left: 0;
|
62 |
+
pointer-events: none;
|
63 |
+
}
|
64 |
+
|
65 |
+
.star {
|
66 |
+
position: absolute;
|
67 |
+
background-color: white;
|
68 |
+
border-radius: 50%;
|
69 |
+
animation: twinkle var(--duration) ease-in-out infinite;
|
70 |
+
opacity: 0;
|
71 |
+
}
|
72 |
+
|
73 |
+
@keyframes twinkle {
|
74 |
+
0% { opacity: 0; transform: scale(0.5); }
|
75 |
+
50% { opacity: 1; transform: scale(1); }
|
76 |
+
100% { opacity: 0; transform: scale(0.5); }
|
77 |
+
}
|
78 |
+
</style>
|
79 |
+
</head>
|
80 |
+
<body class="flex flex-col items-center justify-center p-4">
|
81 |
+
<div class="stars" id="stars"></div>
|
82 |
+
|
83 |
+
<div class="w-full max-w-2xl mx-auto">
|
84 |
+
<div class="unicorn-bg rounded-3xl p-8 md:p-10 text-center relative overflow-hidden mb-8">
|
85 |
+
<div class="absolute top-0 left-0 w-full h-full opacity-20">
|
86 |
+
<div class="absolute top-1/4 left-1/4 w-16 h-16 rounded-full bg-purple-300 blur-xl"></div>
|
87 |
+
<div class="absolute top-1/3 right-1/3 w-20 h-20 rounded-full bg-pink-300 blur-xl"></div>
|
88 |
+
<div class="absolute bottom-1/4 right-1/4 w-24 h-24 rounded-full bg-indigo-300 blur-xl"></div>
|
89 |
+
</div>
|
90 |
+
|
91 |
+
<i class="fas fa-horse-head unicorn-icon text-6xl text-white mb-4"></i>
|
92 |
+
<h1 class="text-4xl md:text-5xl font-bold text-white mb-2">Unicorn Dreamland</h1>
|
93 |
+
<p class="text-xl text-white opacity-90">Magical bedtime stories generated just for you</p>
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<div class="story-card p-6 md:p-8 mb-8">
|
97 |
+
<h2 class="text-2xl font-semibold text-purple-800 mb-4">Create Your Story</h2>
|
98 |
+
|
99 |
+
<div class="mb-6">
|
100 |
+
<label for="storyPrompt" class="block text-gray-700 mb-2">What kind of unicorn story would you like?</label>
|
101 |
+
<div class="relative">
|
102 |
+
<input type="text" id="storyPrompt"
|
103 |
+
class="w-full p-4 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500"
|
104 |
+
placeholder="e.g. A unicorn who discovers a hidden rainbow kingdom">
|
105 |
+
<div class="absolute right-2 top-2">
|
106 |
+
<button id="generateBtn" class="btn-magic px-6 py-2 rounded-lg font-medium">
|
107 |
+
<i class="fas fa-wand-magic-sparkles mr-2"></i> Generate
|
108 |
+
</button>
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
|
113 |
+
<div class="flex flex-wrap gap-2 mb-6">
|
114 |
+
<button class="prompt-btn px-3 py-1 bg-purple-100 text-purple-800 rounded-full text-sm hover:bg-purple-200 transition">
|
115 |
+
<i class="fas fa-moon mr-1"></i> Sleepy unicorn
|
116 |
+
</button>
|
117 |
+
<button class="prompt-btn px-3 py-1 bg-pink-100 text-pink-800 rounded-full text-sm hover:bg-pink-200 transition">
|
118 |
+
<i class="fas fa-rainbow mr-1"></i> Rainbow adventure
|
119 |
+
</button>
|
120 |
+
<button class="prompt-btn px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm hover:bg-indigo-200 transition">
|
121 |
+
<i class="fas fa-star mr-1"></i> Wishing star
|
122 |
+
</button>
|
123 |
+
<button class="prompt-btn px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm hover:bg-blue-200 transition">
|
124 |
+
<i class="fas fa-cloud mr-1"></i> Cloud castle
|
125 |
+
</button>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
|
129 |
+
<div class="story-card p-6 md:p-8">
|
130 |
+
<div class="flex items-center justify-between mb-4">
|
131 |
+
<h2 class="text-2xl font-semibold text-purple-800">Your Story</h2>
|
132 |
+
<button id="copyBtn" class="text-purple-600 hover:text-purple-800 transition">
|
133 |
+
<i class="far fa-copy"></i> Copy
|
134 |
+
</button>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<div id="storyOutput" class="bg-purple-50 rounded-lg p-6 min-h-40 flex items-center justify-center">
|
138 |
+
<p class="text-gray-500 text-center">Your magical unicorn story will appear here...</p>
|
139 |
+
</div>
|
140 |
+
|
141 |
+
<div class="mt-6 flex justify-between">
|
142 |
+
<button id="saveBtn" class="px-4 py-2 border border-purple-500 text-purple-600 rounded-lg hover:bg-purple-50 transition">
|
143 |
+
<i class="far fa-bookmark mr-2"></i> Save
|
144 |
+
</button>
|
145 |
+
<button id="newStoryBtn" class="px-4 py-2 bg-purple-100 text-purple-800 rounded-lg hover:bg-purple-200 transition">
|
146 |
+
<i class="fas fa-plus mr-2"></i> New Story
|
147 |
+
</button>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
|
152 |
+
<div class="mt-8 text-center text-gray-500 text-sm">
|
153 |
+
<p>Made with <i class="fas fa-heart text-pink-500"></i> for dreamers and unicorn lovers</p>
|
154 |
+
</div>
|
155 |
+
|
156 |
+
<script>
|
157 |
+
// Sample unicorn stories to simulate API response
|
158 |
+
const unicornStories = [
|
159 |
+
"Once upon a dream, a silver-maned unicorn named Luna discovered that her tears could heal broken hearts, and so she traveled the world comforting those in need before tucking herself into a cloud each night.",
|
160 |
+
"In a hidden valley where the moon never set, a golden unicorn named Stardust learned to weave dreams from strands of aurora borealis, creating the most beautiful nighttime stories for children around the world.",
|
161 |
+
"Little Sparkle, the smallest unicorn in the enchanted forest, proved that size doesn't matter when she used her glowing horn to light up the entire kingdom during the longest night of the year.",
|
162 |
+
"When the rainbow bridge began to fade, a brave unicorn named Iris embarked on a journey to the edge of the world to collect colors from the sunrise and save the magic of childhood dreams.",
|
163 |
+
"Professor Whiskers, a scholarly unicorn with round glasses, wrote bedtime stories in the sky every evening by tracing constellations with his shimmering tail.",
|
164 |
+
"A sleepy unicorn named Nimbus discovered that when she yawned, tiny dream clouds floated from her mouth, carrying children gently to sleep on soft, cotton candy-like pillows.",
|
165 |
+
"The last unicorn in the valley, named Echo, learned that her beautiful singing voice could make flowers bloom at midnight, creating a secret garden visible only to those who truly believed in magic."
|
166 |
+
];
|
167 |
+
|
168 |
+
// DOM elements
|
169 |
+
const generateBtn = document.getElementById('generateBtn');
|
170 |
+
const storyPrompt = document.getElementById('storyPrompt');
|
171 |
+
const storyOutput = document.getElementById('storyOutput');
|
172 |
+
const copyBtn = document.getElementById('copyBtn');
|
173 |
+
const saveBtn = document.getElementById('saveBtn');
|
174 |
+
const newStoryBtn = document.getElementById('newStoryBtn');
|
175 |
+
const promptBtns = document.querySelectorAll('.prompt-btn');
|
176 |
+
const starsContainer = document.getElementById('stars');
|
177 |
+
|
178 |
+
// Create twinkling stars
|
179 |
+
function createStars() {
|
180 |
+
for (let i = 0; i < 50; i++) {
|
181 |
+
const star = document.createElement('div');
|
182 |
+
star.classList.add('star');
|
183 |
+
star.style.width = `${Math.random() * 3 + 1}px`;
|
184 |
+
star.style.height = star.style.width;
|
185 |
+
star.style.left = `${Math.random() * 100}%`;
|
186 |
+
star.style.top = `${Math.random() * 100}%`;
|
187 |
+
star.style.setProperty('--duration', `${Math.random() * 3 + 2}s`);
|
188 |
+
star.style.animationDelay = `${Math.random() * 5}s`;
|
189 |
+
starsContainer.appendChild(star);
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
// Generate a random unicorn story
|
194 |
+
function generateStory() {
|
195 |
+
const prompt = storyPrompt.value.trim();
|
196 |
+
|
197 |
+
// Show loading state
|
198 |
+
storyOutput.innerHTML = `
|
199 |
+
<div class="flex flex-col items-center">
|
200 |
+
<div class="w-12 h-12 border-4 border-purple-500 border-t-transparent rounded-full animate-spin mb-2"></div>
|
201 |
+
<p class="text-purple-600">Summoning unicorn magic...</p>
|
202 |
+
</div>
|
203 |
+
`;
|
204 |
+
|
205 |
+
// Simulate API delay
|
206 |
+
setTimeout(() => {
|
207 |
+
let story;
|
208 |
+
|
209 |
+
if (prompt) {
|
210 |
+
// In a real app, this would be the API call:
|
211 |
+
// const response = await client.responses.create({
|
212 |
+
// model: "gpt-4.1",
|
213 |
+
// input: `Write a one-sentence bedtime story about a unicorn: ${prompt}`,
|
214 |
+
// });
|
215 |
+
// story = response.output_text;
|
216 |
+
|
217 |
+
// For our demo, we'll use a random story and prepend the prompt
|
218 |
+
const randomStory = unicornStories[Math.floor(Math.random() * unicornStories.length)];
|
219 |
+
story = `"${prompt}" — ${randomStory}`;
|
220 |
+
} else {
|
221 |
+
// If no prompt, use a completely random story
|
222 |
+
story = unicornStories[Math.floor(Math.random() * unicornStories.length)];
|
223 |
+
}
|
224 |
+
|
225 |
+
// Display the story with nice animation
|
226 |
+
storyOutput.innerHTML = '';
|
227 |
+
const storyElement = document.createElement('p');
|
228 |
+
storyElement.className = 'text-gray-700 text-lg leading-relaxed animate-fadeIn';
|
229 |
+
storyElement.textContent = story;
|
230 |
+
storyOutput.appendChild(storyElement);
|
231 |
+
|
232 |
+
// Add some sparkle effects
|
233 |
+
addSparkleEffect();
|
234 |
+
}, 1500);
|
235 |
+
}
|
236 |
+
|
237 |
+
// Add sparkle effect to the story
|
238 |
+
function addSparkleEffect() {
|
239 |
+
for (let i = 0; i < 10; i++) {
|
240 |
+
const sparkle = document.createElement('div');
|
241 |
+
sparkle.className = 'absolute w-2 h-2 bg-yellow-300 rounded-full opacity-70 animate-sparkle';
|
242 |
+
sparkle.style.left = `${Math.random() * 80 + 10}%`;
|
243 |
+
sparkle.style.top = `${Math.random() * 80 + 10}%`;
|
244 |
+
sparkle.style.animationDuration = `${Math.random() * 0.5 + 0.5}s`;
|
245 |
+
sparkle.style.animationDelay = `${Math.random() * 0.5}s`;
|
246 |
+
storyOutput.appendChild(sparkle);
|
247 |
+
|
248 |
+
// Remove sparkle after animation
|
249 |
+
setTimeout(() => {
|
250 |
+
sparkle.remove();
|
251 |
+
}, 1000);
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
// Copy story to clipboard
|
256 |
+
function copyStory() {
|
257 |
+
const storyText = storyOutput.textContent;
|
258 |
+
if (storyText && !storyText.includes('Your magical unicorn story')) {
|
259 |
+
navigator.clipboard.writeText(storyText)
|
260 |
+
.then(() => {
|
261 |
+
// Show copied feedback
|
262 |
+
const originalIcon = copyBtn.innerHTML;
|
263 |
+
copyBtn.innerHTML = '<i class="fas fa-check"></i> Copied!';
|
264 |
+
setTimeout(() => {
|
265 |
+
copyBtn.innerHTML = originalIcon;
|
266 |
+
}, 2000);
|
267 |
+
});
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
+
// Save story (simulated)
|
272 |
+
function saveStory() {
|
273 |
+
const storyText = storyOutput.textContent;
|
274 |
+
if (storyText && !storyText.includes('Your magical unicorn story')) {
|
275 |
+
// In a real app, this would save to a database
|
276 |
+
saveBtn.innerHTML = '<i class="fas fa-check"></i> Saved!';
|
277 |
+
setTimeout(() => {
|
278 |
+
saveBtn.innerHTML = '<i class="far fa-bookmark mr-2"></i> Save';
|
279 |
+
}, 2000);
|
280 |
+
}
|
281 |
+
}
|
282 |
+
|
283 |
+
// Reset for a new story
|
284 |
+
function newStory() {
|
285 |
+
storyPrompt.value = '';
|
286 |
+
storyOutput.innerHTML = '<p class="text-gray-500 text-center">Your magical unicorn story will appear here...</p>';
|
287 |
+
}
|
288 |
+
|
289 |
+
// Event listeners
|
290 |
+
generateBtn.addEventListener('click', generateStory);
|
291 |
+
copyBtn.addEventListener('click', copyStory);
|
292 |
+
saveBtn.addEventListener('click', saveStory);
|
293 |
+
newStoryBtn.addEventListener('click', newStory);
|
294 |
+
|
295 |
+
// Allow Enter key to generate story
|
296 |
+
storyPrompt.addEventListener('keypress', (e) => {
|
297 |
+
if (e.key === 'Enter') {
|
298 |
+
generateStory();
|
299 |
+
}
|
300 |
+
});
|
301 |
+
|
302 |
+
// Quick prompt buttons
|
303 |
+
promptBtns.forEach(btn => {
|
304 |
+
btn.addEventListener('click', () => {
|
305 |
+
storyPrompt.value = btn.textContent.trim();
|
306 |
+
generateStory();
|
307 |
+
});
|
308 |
+
});
|
309 |
+
|
310 |
+
// Initialize
|
311 |
+
createStars();
|
312 |
+
|
313 |
+
// Add some CSS for animations
|
314 |
+
const style = document.createElement('style');
|
315 |
+
style.textContent = `
|
316 |
+
@keyframes sparkle {
|
317 |
+
0% { transform: scale(0); opacity: 0; }
|
318 |
+
50% { transform: scale(1.5); opacity: 1; }
|
319 |
+
100% { transform: scale(0); opacity: 0; }
|
320 |
+
}
|
321 |
+
|
322 |
+
.animate-sparkle {
|
323 |
+
animation: sparkle ease-in-out;
|
324 |
+
}
|
325 |
+
|
326 |
+
@keyframes fadeIn {
|
327 |
+
from { opacity: 0; transform: translateY(10px); }
|
328 |
+
to { opacity: 1; transform: translateY(0); }
|
329 |
+
}
|
330 |
+
|
331 |
+
.animate-fadeIn {
|
332 |
+
animation: fadeIn 0.5s ease-out forwards;
|
333 |
+
}
|
334 |
+
`;
|
335 |
+
document.head.appendChild(style);
|
336 |
+
</script>
|
337 |
+
<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=privateuserh/privatedev1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
338 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Create a site privatedev1 using import OpenAI from "openai"; const client = new OpenAI(); const response = await client.responses.create({ model: "gpt-4.1", input: "Write a one-sentence bedtime story about a unicorn.", }); console.log(response.output_text);
|