Sidaliuus commited on
Commit
9a6b28a
·
verified ·
1 Parent(s): e3ea701

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +289 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Btc Model
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: btc-model
3
+ emoji: 🐳
4
+ colorFrom: blue
5
+ colorTo: pink
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,289 @@
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>Bitcoin Tracker | Live Crypto Prices</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
+ <script>
10
+ tailwind.config = {
11
+ theme: {
12
+ extend: {
13
+ colors: {
14
+ bitcoin: '#F7931A',
15
+ },
16
+ animation: {
17
+ 'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
18
+ }
19
+ }
20
+ }
21
+ }
22
+ </script>
23
+ <style>
24
+ .gradient-bg {
25
+ background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
26
+ }
27
+ .price-up {
28
+ color: #10B981;
29
+ }
30
+ .price-down {
31
+ color: #EF4444;
32
+ }
33
+ .coin-icon {
34
+ filter: drop-shadow(0 0 8px rgba(247, 147, 26, 0.6));
35
+ }
36
+ .card-glow {
37
+ box-shadow: 0 0 15px rgba(247, 147, 26, 0.3);
38
+ }
39
+ .refresh-spin {
40
+ animation: spin 1.5s linear infinite;
41
+ }
42
+ @keyframes spin {
43
+ 0% { transform: rotate(0deg); }
44
+ 100% { transform: rotate(360deg); }
45
+ }
46
+ </style>
47
+ </head>
48
+ <body class="gradient-bg min-h-screen text-white font-sans">
49
+ <div class="container mx-auto px-4 py-8">
50
+ <!-- Header -->
51
+ <header class="flex justify-between items-center mb-10">
52
+ <div class="flex items-center space-x-3">
53
+ <i class="fab fa-bitcoin text-4xl text-bitcoin coin-icon"></i>
54
+ <h1 class="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-bitcoin to-yellow-200">
55
+ Bitcoin Tracker
56
+ </h1>
57
+ </div>
58
+ <div class="flex items-center space-x-4">
59
+ <span id="last-updated" class="text-gray-400 text-sm"></span>
60
+ <button id="refresh-btn" class="bg-gray-800 hover:bg-gray-700 p-2 rounded-full transition-all">
61
+ <i class="fas fa-sync-alt"></i>
62
+ </button>
63
+ </div>
64
+ </header>
65
+
66
+ <!-- Main Price Card -->
67
+ <div class="bg-gray-800 rounded-2xl p-6 mb-8 card-glow transition-all hover:shadow-lg">
68
+ <div class="flex flex-col md:flex-row justify-between items-center">
69
+ <div class="flex items-center mb-4 md:mb-0">
70
+ <i class="fab fa-bitcoin text-5xl text-bitcoin mr-4"></i>
71
+ <div>
72
+ <h2 class="text-2xl font-bold">Bitcoin (BTC)</h2>
73
+ <p class="text-gray-400">Digital Gold</p>
74
+ </div>
75
+ </div>
76
+ <div class="text-center md:text-right">
77
+ <div class="text-4xl font-bold mb-2" id="btc-price">--</div>
78
+ <div class="flex justify-center md:justify-end items-center">
79
+ <span id="price-change" class="text-lg font-medium px-3 py-1 rounded-full">--</span>
80
+ <span id="price-change-percent" class="text-lg font-medium px-3 py-1 rounded-full ml-2">--</span>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </div>
85
+
86
+ <!-- Market Data Grid -->
87
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-10">
88
+ <!-- Market Cap -->
89
+ <div class="bg-gray-800 rounded-xl p-5 hover:bg-gray-700 transition-all">
90
+ <div class="flex justify-between items-center mb-3">
91
+ <h3 class="text-gray-400">Market Cap</h3>
92
+ <i class="fas fa-chart-pie text-bitcoin"></i>
93
+ </div>
94
+ <div class="text-2xl font-bold" id="market-cap">--</div>
95
+ <div class="h-1 bg-gray-700 my-2 rounded-full">
96
+ <div class="h-1 bg-bitcoin rounded-full w-full"></div>
97
+ </div>
98
+ </div>
99
+
100
+ <!-- 24h Volume -->
101
+ <div class="bg-gray-800 rounded-xl p-5 hover:bg-gray-700 transition-all">
102
+ <div class="flex justify-between items-center mb-3">
103
+ <h3 class="text-gray-400">24h Volume</h3>
104
+ <i class="fas fa-exchange-alt text-bitcoin"></i>
105
+ </div>
106
+ <div class="text-2xl font-bold" id="volume">--</div>
107
+ <div class="h-1 bg-gray-700 my-2 rounded-full">
108
+ <div class="h-1 bg-bitcoin rounded-full w-3/4"></div>
109
+ </div>
110
+ </div>
111
+
112
+ <!-- Circulating Supply -->
113
+ <div class="bg-gray-800 rounded-xl p-5 hover:bg-gray-700 transition-all">
114
+ <div class="flex justify-between items-center mb-3">
115
+ <h3 class="text-gray-400">Circulating Supply</h3>
116
+ <i class="fas fa-coins text-bitcoin"></i>
117
+ </div>
118
+ <div class="text-2xl font-bold" id="supply">--</div>
119
+ <div class="h-1 bg-gray-700 my-2 rounded-full">
120
+ <div class="h-1 bg-bitcoin rounded-full w-2/3"></div>
121
+ </div>
122
+ </div>
123
+
124
+ <!-- All Time High -->
125
+ <div class="bg-gray-800 rounded-xl p-5 hover:bg-gray-700 transition-all">
126
+ <div class="flex justify-between items-center mb-3">
127
+ <h3 class="text-gray-400">All Time High</h3>
128
+ <i class="fas fa-trophy text-bitcoin"></i>
129
+ </div>
130
+ <div class="text-2xl font-bold" id="ath">--</div>
131
+ <div class="h-1 bg-gray-700 my-2 rounded-full">
132
+ <div class="h-1 bg-bitcoin rounded-full w-1/2"></div>
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+ <!-- Price Chart Placeholder -->
138
+ <div class="bg-gray-800 rounded-2xl p-6 mb-8">
139
+ <div class="flex justify-between items-center mb-6">
140
+ <h2 class="text-xl font-bold">BTC/USD Price Chart</h2>
141
+ <div class="flex space-x-2">
142
+ <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded-lg text-sm">24h</button>
143
+ <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded-lg text-sm">7d</button>
144
+ <button class="bg-bitcoin hover:bg-yellow-600 px-3 py-1 rounded-lg text-sm">1m</button>
145
+ <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded-lg text-sm">1y</button>
146
+ </div>
147
+ </div>
148
+ <div class="h-64 bg-gray-900 rounded-lg flex items-center justify-center">
149
+ <p class="text-gray-500">Chart data would be displayed here</p>
150
+ </div>
151
+ </div>
152
+
153
+ <!-- Additional Info -->
154
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
155
+ <div class="bg-gray-800 rounded-2xl p-6">
156
+ <h2 class="text-xl font-bold mb-4">About Bitcoin</h2>
157
+ <p class="text-gray-300 mb-4">
158
+ Bitcoin is a decentralized digital currency that enables instant payments to anyone, anywhere in the world.
159
+ It uses peer-to-peer technology to operate with no central authority.
160
+ </p>
161
+ <div class="flex space-x-4">
162
+ <a href="#" class="text-bitcoin hover:underline">Whitepaper</a>
163
+ <a href="#" class="text-bitcoin hover:underline">GitHub</a>
164
+ <a href="#" class="text-bitcoin hover:underline">Official Site</a>
165
+ </div>
166
+ </div>
167
+ <div class="bg-gray-800 rounded-2xl p-6">
168
+ <h2 class="text-xl font-bold mb-4">Quick Links</h2>
169
+ <div class="grid grid-cols-2 gap-4">
170
+ <a href="#" class="flex items-center p-3 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all">
171
+ <i class="fas fa-newspaper text-bitcoin mr-2"></i>
172
+ <span>News</span>
173
+ </a>
174
+ <a href="#" class="flex items-center p-3 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all">
175
+ <i class="fas fa-calculator text-bitcoin mr-2"></i>
176
+ <span>Calculator</span>
177
+ </a>
178
+ <a href="#" class="flex items-center p-3 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all">
179
+ <i class="fas fa-wallet text-bitcoin mr-2"></i>
180
+ <span>Wallets</span>
181
+ </a>
182
+ <a href="#" class="flex items-center p-3 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all">
183
+ <i class="fas fa-chart-line text-bitcoin mr-2"></i>
184
+ <span>Markets</span>
185
+ </a>
186
+ </div>
187
+ </div>
188
+ </div>
189
+
190
+ <!-- Footer -->
191
+ <footer class="mt-12 text-center text-gray-500 text-sm">
192
+ <p>Data provided by CoinGecko API. Prices update every 60 seconds.</p>
193
+ <p class="mt-2">© 2023 Bitcoin Tracker. Not financial advice.</p>
194
+ </footer>
195
+ </div>
196
+
197
+ <script>
198
+ // Function to format numbers with commas
199
+ function formatNumber(num) {
200
+ return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
201
+ }
202
+
203
+ // Function to format currency
204
+ function formatCurrency(num) {
205
+ return '$' + num.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
206
+ }
207
+
208
+ // Function to update the UI with Bitcoin data
209
+ function updateBitcoinData(data) {
210
+ const btcData = data.bitcoin;
211
+
212
+ // Update price
213
+ const priceElement = document.getElementById('btc-price');
214
+ priceElement.textContent = formatCurrency(btcData.usd);
215
+
216
+ // Update price change
217
+ const priceChangeElement = document.getElementById('price-change');
218
+ const priceChangePercentElement = document.getElementById('price-change-percent');
219
+
220
+ if (btcData.usd_24h_change >= 0) {
221
+ priceChangeElement.textContent = `+${formatCurrency(btcData.usd_24h_change)}`;
222
+ priceChangeElement.className = 'price-up bg-green-900/30 text-lg font-medium px-3 py-1 rounded-full';
223
+ priceChangePercentElement.textContent = `+${btcData.usd_24h_change.toFixed(2)}%`;
224
+ priceChangePercentElement.className = 'price-up bg-green-900/30 text-lg font-medium px-3 py-1 rounded-full ml-2';
225
+ } else {
226
+ priceChangeElement.textContent = formatCurrency(btcData.usd_24h_change);
227
+ priceChangeElement.className = 'price-down bg-red-900/30 text-lg font-medium px-3 py-1 rounded-full';
228
+ priceChangePercentElement.textContent = `${btcData.usd_24h_change.toFixed(2)}%`;
229
+ priceChangePercentElement.className = 'price-down bg-red-900/30 text-lg font-medium px-3 py-1 rounded-full ml-2';
230
+ }
231
+
232
+ // Update market data
233
+ document.getElementById('market-cap').textContent = formatCurrency(btcData.usd_market_cap);
234
+ document.getElementById('volume').textContent = formatCurrency(btcData.usd_24h_vol);
235
+ document.getElementById('supply').textContent = formatNumber(Math.round(btcData.circulating_supply)) + ' BTC';
236
+ document.getElementById('ath').textContent = formatCurrency(btcData.ath.usd);
237
+
238
+ // Update last updated time
239
+ const now = new Date();
240
+ document.getElementById('last-updated').textContent = `Updated: ${now.toLocaleTimeString()}`;
241
+ }
242
+
243
+ // Function to fetch Bitcoin data from CoinGecko API
244
+ async function fetchBitcoinData() {
245
+ try {
246
+ // Show loading state
247
+ const refreshBtn = document.getElementById('refresh-btn');
248
+ refreshBtn.innerHTML = '<i class="fas fa-sync-alt refresh-spin"></i>';
249
+
250
+ // Simulate API call (in a real app, you would use the actual CoinGecko API)
251
+ // For demo purposes, we'll use mock data
252
+ const mockData = {
253
+ bitcoin: {
254
+ usd: Math.random() * 10000 + 20000, // Random price between 20k-30k
255
+ usd_24h_change: (Math.random() * 2000 - 1000) / 100, // Random change between -10 to +10
256
+ usd_market_cap: 600000000000 + Math.random() * 100000000000,
257
+ usd_24h_vol: 20000000000 + Math.random() * 10000000000,
258
+ circulating_supply: 19400000 + Math.random() * 100000,
259
+ ath: {
260
+ usd: 69000
261
+ }
262
+ }
263
+ };
264
+
265
+ // Simulate network delay
266
+ await new Promise(resolve => setTimeout(resolve, 800));
267
+
268
+ updateBitcoinData(mockData);
269
+
270
+ // Reset refresh button
271
+ refreshBtn.innerHTML = '<i class="fas fa-sync-alt"></i>';
272
+ } catch (error) {
273
+ console.error('Error fetching Bitcoin data:', error);
274
+ // Reset refresh button even if there's an error
275
+ document.getElementById('refresh-btn').innerHTML = '<i class="fas fa-sync-alt"></i>';
276
+ }
277
+ }
278
+
279
+ // Initial data load
280
+ document.addEventListener('DOMContentLoaded', fetchBitcoinData);
281
+
282
+ // Set up refresh button
283
+ document.getElementById('refresh-btn').addEventListener('click', fetchBitcoinData);
284
+
285
+ // Auto-refresh every 60 seconds
286
+ setInterval(fetchBitcoinData, 60000);
287
+ </script>
288
+ <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=Sidaliuus/btc-model" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
289
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ موقع يضهر موشرات بيتكوين و سعر