Akademics commited on
Commit
8f39e7a
·
verified ·
1 Parent(s): a0e99ed

make the market sentiment interactive - Follow Up Deployment

Browse files
Files changed (2) hide show
  1. index.html +150 -17
  2. prompts.txt +3 -1
index.html CHANGED
@@ -363,17 +363,17 @@
363
  <div class="flex items-center space-x-4">
364
  <div class="flex items-center">
365
  <img src="https://cryptologos.cc/logos/bitcoin-btc-logo.png" alt="BTC" class="h-8 w-8 mr-2">
366
- <span class="font-bold text-lg">BTC/USDT</span>
367
  </div>
368
- <div class="text-success">
369
- <span class="font-bold" id="current-price">$42,876.45</span>
370
- <span class="text-sm ml-1" id="price-change">+2.34%</span>
371
  </div>
372
  </div>
373
  <div class="flex items-center space-x-2 sm:space-x-4">
374
  <div class="flex items-center space-x-2">
375
  <span class="hidden sm:inline">Volume:</span>
376
- <span class="font-bold" id="current-volume">24.5K BTC</span>
377
  </div>
378
  <div class="flex space-x-2">
379
  <button class="btn btn-sm bg-gray-700 hover:bg-gray-600 p-2 rounded-lg">
@@ -677,12 +677,25 @@
677
 
678
  <!-- News & Sentiment -->
679
  <div class="bg-gray-800 rounded-xl p-4 shadow-lg">
680
- <h2 class="text-lg font-semibold mb-4 flex items-center">
681
- <i class="fas fa-newspaper mr-2"></i> Market Sentiment
682
- </h2>
683
- <div class="space-y-3">
684
- <div class="flex items-start space-x-3">
685
- <div class="bg-accent p-2 rounded-full">
 
 
 
 
 
 
 
 
 
 
 
 
 
686
  <i class="fas fa-bullhorn text-sm"></i>
687
  </div>
688
  <div>
@@ -690,7 +703,7 @@
690
  <div class="text-xs text-gray-400">2 hours ago • Bullish</div>
691
  </div>
692
  </div>
693
- <div class="flex items-start space-x-3">
694
  <div class="bg-danger p-2 rounded-full">
695
  <i class="fas fa-exclamation-triangle text-sm"></i>
696
  </div>
@@ -699,7 +712,7 @@
699
  <div class="text-xs text-gray-400">4 hours ago • Bearish</div>
700
  </div>
701
  </div>
702
- <div class="flex items-start space-x-3">
703
  <div class="bg-success p-2 rounded-full">
704
  <i class="fas fa-chart-line text-sm"></i>
705
  </div>
@@ -784,22 +797,22 @@
784
  const newPrice = basePrice + change;
785
  const percentChange = (change / basePrice * 100).toFixed(2);
786
 
787
- document.getElementById('current-price').textContent = `$${newPrice.toFixed(2)}`;
788
 
789
  const priceChangeElement = document.getElementById('price-change');
790
  if (change >= 0) {
791
  priceChangeElement.textContent = `+${percentChange}%`;
792
- priceChangeElement.className = 'text-sm ml-1 text-success';
793
  } else {
794
  priceChangeElement.textContent = `${percentChange}%`;
795
- priceChangeElement.className = 'text-sm ml-1 text-danger';
796
  }
797
 
798
  // Update volume randomly
799
  const baseVolume = 24500;
800
  const volumeChange = (Math.random() - 0.3) * 5000;
801
  const newVolume = baseVolume + volumeChange;
802
- document.getElementById('current-volume').textContent = `${(newVolume/1000).toFixed(1)}K BTC`;
803
 
804
  // Update server metrics
805
  document.getElementById('server-load').textContent = `${Math.floor(Math.random() * 30) + 10}%`;
@@ -1076,5 +1089,125 @@
1076
  }
1077
  setInterval(updateSignals, 8000);
1078
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1079
  <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=Akademics/https-huggingface-co-spaces-akademics" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1080
  </html>
 
363
  <div class="flex items-center space-x-4">
364
  <div class="flex items-center">
365
  <img src="https://cryptologos.cc/logos/bitcoin-btc-logo.png" alt="BTC" class="h-8 w-8 mr-2">
366
+ <span class="font-bold text-xl">BTC/USDT</span>
367
  </div>
368
+ <div class="flex items-center text-success">
369
+ <span class="font-bold text-2xl ml-1" id="current-price">42,876.45</span>
370
+ <span class="text-sm ml-2 px-2 py-0.5 rounded" id="price-change">+2.34%</span>
371
  </div>
372
  </div>
373
  <div class="flex items-center space-x-2 sm:space-x-4">
374
  <div class="flex items-center space-x-2">
375
  <span class="hidden sm:inline">Volume:</span>
376
+ <span class="font-bold" id="current-volume">24.5K</span>
377
  </div>
378
  <div class="flex space-x-2">
379
  <button class="btn btn-sm bg-gray-700 hover:bg-gray-600 p-2 rounded-lg">
 
677
 
678
  <!-- News & Sentiment -->
679
  <div class="bg-gray-800 rounded-xl p-4 shadow-lg">
680
+ <div class="flex justify-between items-center mb-4">
681
+ <h2 class="text-lg font-semibold flex items-center">
682
+ <i class="fas fa-newspaper mr-2"></i> Market Sentiment
683
+ </h2>
684
+ <div class="flex space-x-2">
685
+ <button class="sentiment-filter-btn btn btn-xs bg-primary hover:bg-blue-800 px-2 py-1 rounded text-xs" data-filter="all">
686
+ All
687
+ </button>
688
+ <button class="sentiment-filter-btn btn btn-xs bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded text-xs" data-filter="bullish">
689
+ <i class="fas fa-arrow-up mr-1"></i>
690
+ </button>
691
+ <button class="sentiment-filter-btn btn btn-xs bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded text-xs" data-filter="bearish">
692
+ <i class="fas fa-arrow-down mr-1"></i>
693
+ </button>
694
+ </div>
695
+ </div>
696
+ <div class="space-y-3" id="sentiment-items">
697
+ <div class="sentiment-item cursor-pointer transition hover:bg-gray-700 flex items-start space-x-3 p-2 rounded-lg" data-sentiment="bullish" onclick="showSentimentDetail('Fed Signals Potential Rate Pause', 'bullish', 'The Federal Reserve has indicated a possible pause in rate hikes for their next meeting, signaling potential relief for markets.')">
698
+ <div class="bg-success p-2 rounded-full">
699
  <i class="fas fa-bullhorn text-sm"></i>
700
  </div>
701
  <div>
 
703
  <div class="text-xs text-gray-400">2 hours ago • Bullish</div>
704
  </div>
705
  </div>
706
+ <div class="sentiment-item cursor-pointer transition hover:bg-gray-700 flex items-start space-x-3 p-2 rounded-lg" data-sentiment="bearish" onclick="showSentimentDetail('Binance Regulatory Concerns', 'bearish', 'Increased regulatory scrutiny on Binance has raised concerns about potential impacts on crypto market liquidity.')">
707
  <div class="bg-danger p-2 rounded-full">
708
  <i class="fas fa-exclamation-triangle text-sm"></i>
709
  </div>
 
712
  <div class="text-xs text-gray-400">4 hours ago • Bearish</div>
713
  </div>
714
  </div>
715
+ <div class="sentiment-item cursor-pointer transition hover:bg-gray-700 flex items-start space-x-3 p-2 rounded-lg" data-sentiment="bullish" onclick="showSentimentDetail('Bitcoin ETF Approval Odds Increase', 'bullish', 'Analysts are increasing their odds of SEC approval for a spot Bitcoin ETF following new filings from major asset managers.')">
716
  <div class="bg-success p-2 rounded-full">
717
  <i class="fas fa-chart-line text-sm"></i>
718
  </div>
 
797
  const newPrice = basePrice + change;
798
  const percentChange = (change / basePrice * 100).toFixed(2);
799
 
800
+ document.getElementById('current-price').textContent = newPrice.toFixed(2);
801
 
802
  const priceChangeElement = document.getElementById('price-change');
803
  if (change >= 0) {
804
  priceChangeElement.textContent = `+${percentChange}%`;
805
+ priceChangeElement.className = 'text-sm ml-2 px-2 py-0.5 rounded text-success bg-green-900 bg-opacity-40';
806
  } else {
807
  priceChangeElement.textContent = `${percentChange}%`;
808
+ priceChangeElement.className = 'text-sm ml-2 px-2 py-0.5 rounded text-danger bg-red-900 bg-opacity-40';
809
  }
810
 
811
  // Update volume randomly
812
  const baseVolume = 24500;
813
  const volumeChange = (Math.random() - 0.3) * 5000;
814
  const newVolume = baseVolume + volumeChange;
815
+ document.getElementById('current-volume').textContent = `${(newVolume/1000).toFixed(1)}K`;
816
 
817
  // Update server metrics
818
  document.getElementById('server-load').textContent = `${Math.floor(Math.random() * 30) + 10}%`;
 
1089
  }
1090
  setInterval(updateSignals, 8000);
1091
  </script>
1092
+
1093
+ <!-- Sentiment Detail Modal -->
1094
+ <div id="sentiment-detail-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
1095
+ <div class="bg-gray-800 rounded-lg p-6 w-full max-w-md">
1096
+ <div class="flex justify-between items-center mb-4">
1097
+ <h3 id="sentiment-title" class="text-xl font-bold"></h3>
1098
+ <button onclick="closeSentimentDetail()" class="text-gray-400 hover:text-white">
1099
+ <i class="fas fa-times"></i>
1100
+ </button>
1101
+ </div>
1102
+ <div class="flex items-center mb-4">
1103
+ <div id="sentiment-icon" class="p-2 rounded-full mr-3">
1104
+ <i id="sentiment-icon-inner" class="fas"></i>
1105
+ </div>
1106
+ <span id="sentiment-type" class="font-bold"></span>
1107
+ </div>
1108
+ <p id="sentiment-description" class="mb-6 text-gray-300"></p>
1109
+ <div class="flex justify-end">
1110
+ <button onclick="closeSentimentDetail()" class="btn btn-primary px-4 py-2">Close</button>
1111
+ </div>
1112
+ </div>
1113
+ </div>
1114
+
1115
+ <script>
1116
+ // Sentiment filtering functionality
1117
+ document.querySelectorAll('.sentiment-filter-btn').forEach(btn => {
1118
+ btn.addEventListener('click', function() {
1119
+ const filter = this.dataset.filter;
1120
+
1121
+ // Update active button
1122
+ document.querySelectorAll('.sentiment-filter-btn').forEach(b => {
1123
+ b.classList.remove('bg-primary');
1124
+ b.classList.add('bg-gray-700');
1125
+ });
1126
+ this.classList.add('bg-primary');
1127
+ this.classList.remove('bg-gray-700');
1128
+
1129
+ // Filter items
1130
+ document.querySelectorAll('.sentiment-item').forEach(item => {
1131
+ if (filter === 'all' || item.dataset.sentiment === filter) {
1132
+ item.classList.remove('hidden');
1133
+ } else {
1134
+ item.classList.add('hidden');
1135
+ }
1136
+ });
1137
+ });
1138
+ });
1139
+
1140
+ // Sentiment detail display
1141
+ function showSentimentDetail(title, type, description) {
1142
+ const modal = document.getElementById('sentiment-detail-modal');
1143
+ const icon = document.getElementById('sentiment-icon');
1144
+ const iconInner = document.getElementById('sentiment-icon-inner');
1145
+
1146
+ document.getElementById('sentiment-title').textContent = title;
1147
+ document.getElementById('sentiment-type').textContent = type.charAt(0).toUpperCase() + type.slice(1);
1148
+ document.getElementById('sentiment-description').textContent = description;
1149
+
1150
+ // Set icon and color based on sentiment type
1151
+ if (type === 'bullish') {
1152
+ icon.className = 'p-2 rounded-full mr-3 bg-success';
1153
+ iconInner.className = 'fas fa-arrow-up';
1154
+ } else {
1155
+ icon.className = 'p-2 rounded-full mr-3 bg-danger';
1156
+ iconInner.className = 'fas fa-arrow-down';
1157
+ }
1158
+
1159
+ modal.classList.remove('hidden');
1160
+ }
1161
+
1162
+ function closeSentimentDetail() {
1163
+ document.getElementById('sentiment-detail-modal').classList.add('hidden');
1164
+ }
1165
+
1166
+ // Simulate adding new sentiment items
1167
+ setInterval(() => {
1168
+ const sentiments = ['bullish', 'bearish'];
1169
+ const titles = [
1170
+ 'Institutional Bitcoin Buying Increases',
1171
+ 'New Crypto Regulations Proposed',
1172
+ 'Ethereum Network Activity Spikes',
1173
+ 'Market Liquidity Concerns Grow',
1174
+ 'Fed Chair Comments Boost Markets'
1175
+ ];
1176
+ const icons = ['bullhorn', 'chart-line', 'exclamation-triangle', 'university', 'balance-scale'];
1177
+ const descriptions = [
1178
+ 'Large institutional investors are increasing their Bitcoin exposure according to recent filings.',
1179
+ 'New regulatory proposals could impact crypto exchange operations in multiple jurisdictions.',
1180
+ 'Ethereum network activity has surged to 6-month highs according to on-chain data.',
1181
+ 'Analysts warn of decreasing liquidity in some altcoin markets.',
1182
+ 'Positive remarks from the Federal Reserve chairman sparked a market rally across assets.'
1183
+ ];
1184
+
1185
+ const randomIndex = Math.floor(Math.random() * titles.length);
1186
+ const sentiment = sentiments[Math.floor(Math.random() * sentiments.length)];
1187
+ const icon = icons[Math.floor(Math.random() * icons.length)];
1188
+
1189
+ const newItem = document.createElement('div');
1190
+ newItem.className = `sentiment-item cursor-pointer transition hover:bg-gray-700 flex items-start space-x-3 p-2 rounded-lg`;
1191
+ newItem.dataset.sentiment = sentiment;
1192
+ newItem.setAttribute('onclick', `showSentimentDetail('${titles[randomIndex]}', '${sentiment}', '${descriptions[randomIndex]}')`);
1193
+ newItem.innerHTML = `
1194
+ <div class="bg-${sentiment === 'bullish' ? 'success' : 'danger'} p-2 rounded-full">
1195
+ <i class="fas fa-${icon} text-sm"></i>
1196
+ </div>
1197
+ <div>
1198
+ <div class="font-medium">${titles[randomIndex]}</div>
1199
+ <div class="text-xs text-gray-400">Just now • ${sentiment.charAt(0).toUpperCase() + sentiment.slice(1)}</div>
1200
+ </div>
1201
+ `;
1202
+
1203
+ const container = document.getElementById('sentiment-items');
1204
+ container.insertBefore(newItem, container.firstChild);
1205
+
1206
+ // Remove oldest item if we have more than 5
1207
+ if (container.children.length > 5) {
1208
+ container.removeChild(container.lastChild);
1209
+ }
1210
+ }, 15000);
1211
+ </script>
1212
  <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=Akademics/https-huggingface-co-spaces-akademics" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1213
  </html>
prompts.txt CHANGED
@@ -1,2 +1,4 @@
1
  why is it that i cant log in through the exchange link
2
- Why can't I log in through metaTrader 5
 
 
 
1
  why is it that i cant log in through the exchange link
2
+ Why can't I log in through metaTrader 5
3
+ update all prices to correspond with trading View
4
+ make the market sentiment interactive