Really-amin commited on
Commit
265ef5c
Β·
verified Β·
1 Parent(s): ffddabd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +343 -339
README.md CHANGED
@@ -1,339 +1,343 @@
1
- # πŸš€ Crypto Intelligence Hub
2
-
3
- AI-Powered Cryptocurrency Data Collection & Analysis Center
4
-
5
- ---
6
-
7
- ## ⚑ Quick Start
8
-
9
- ### One Command to Run Everything:
10
-
11
- ```powershell
12
- .\run_server.ps1
13
- ```
14
-
15
- That's it! The script will:
16
- - βœ… Set HF_TOKEN environment variable
17
- - βœ… Run system tests
18
- - βœ… Start the server
19
-
20
- Then open: **http://localhost:7860/**
21
-
22
- ---
23
-
24
- ## πŸ“‹ What's Included
25
-
26
- ### ✨ Features
27
-
28
- - πŸ€– **AI Sentiment Analysis** - Using Hugging Face models
29
- - πŸ“Š **Market Data** - Real-time crypto prices from CoinGecko
30
- - πŸ“° **News Analysis** - Sentiment analysis on crypto news
31
- - πŸ’Ή **Trading Pairs** - 300+ pairs with searchable dropdown
32
- - πŸ“ˆ **Charts & Visualizations** - Interactive data charts
33
- - πŸ” **Provider Management** - Track API providers status
34
-
35
- ### 🎨 Pages
36
-
37
- - **Main Dashboard** (`/`) - Overview and statistics
38
- - **AI Tools** (`/ai-tools`) - Standalone sentiment & summarization tools
39
- - **API Docs** (`/docs`) - FastAPI auto-generated documentation
40
-
41
- ---
42
-
43
- ## πŸ› οΈ Setup
44
-
45
- ### Prerequisites
46
-
47
- - Python 3.8+
48
- - Internet connection (for HF models & APIs)
49
-
50
- ### Installation
51
-
52
- 1. **Clone/Download** this repository
53
-
54
- 2. **Install dependencies:**
55
- ```bash
56
- pip install -r requirements.txt
57
- ```
58
-
59
- 3. **Run the server:**
60
- ```powershell
61
- .\run_server.ps1
62
- ```
63
-
64
- ---
65
-
66
- ## πŸ”‘ Configuration
67
-
68
- ### Hugging Face Token
69
-
70
- Your HF token is already configured in `run_server.ps1`:
71
- ```
72
- HF_TOKEN: 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
73
- HF_MODE: public
74
- ```
75
-
76
- For Hugging Face Space deployment:
77
- 1. Go to: Settings β†’ Repository secrets
78
- 2. Add: `HF_TOKEN` = `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`
79
- 3. Add: `HF_MODE` = `public`
80
- 4. Restart Space
81
-
82
- ---
83
-
84
- ## πŸ“ Project Structure
85
-
86
- ```
87
- .
88
- β”œβ”€β”€ api_server_extended.py # Main FastAPI server
89
- β”œβ”€β”€ ai_models.py # HF models & sentiment analysis
90
- β”œβ”€β”€ config.py # Configuration
91
- β”œβ”€β”€ index.html # Main dashboard UI
92
- β”œβ”€β”€ ai_tools.html # Standalone AI tools page
93
- β”œβ”€β”€ static/
94
- β”‚ β”œβ”€β”€ css/
95
- β”‚ β”‚ └── main.css # Styles
96
- β”‚ └── js/
97
- β”‚ β”œβ”€β”€ app.js # Main JavaScript
98
- β”‚ └── trading-pairs-loader.js # Trading pairs loader
99
- β”œβ”€β”€ trading_pairs.txt # 300+ trading pairs
100
- β”œβ”€β”€ run_server.ps1 # Start script (Windows)
101
- β”œβ”€β”€ test_fixes.py # System tests
102
- └── README.md # This file
103
- ```
104
-
105
- ---
106
-
107
- ## πŸ§ͺ Testing
108
-
109
- ### Run all tests:
110
- ```bash
111
- python test_fixes.py
112
- ```
113
-
114
- ### Expected output:
115
- ```
116
- ============================================================
117
- [TEST] Testing All Fixes
118
- ============================================================
119
- [*] Testing file existence...
120
- [OK] Found: index.html
121
- ... (all files)
122
-
123
- [*] Testing trading pairs file...
124
- [OK] Found 300 trading pairs
125
-
126
- [*] Testing AI models configuration...
127
- [OK] All essential models linked
128
-
129
- ============================================================
130
- Overall: 6/6 tests passed (100.0%)
131
- ============================================================
132
- [SUCCESS] All tests passed! System is ready to use!
133
- ```
134
-
135
- ---
136
-
137
- ## πŸ“Š Current Test Status
138
-
139
- Your latest test results:
140
- ```
141
- βœ… File Existence - PASS
142
- βœ… Trading Pairs - PASS
143
- βœ… Index.html Links - PASS
144
- βœ… AI Models Config - PASS
145
- ⚠️ Environment Variables - FAIL (Fixed by run_server.ps1)
146
- βœ… App.js Functions - PASS
147
-
148
- Score: 5/6 (83.3%) β†’ Will be 6/6 after running run_server.ps1
149
- ```
150
-
151
- ---
152
-
153
- ## 🎯 Features Overview
154
-
155
- ### 1. **Sentiment Analysis**
156
- - 5 modes: Auto, Crypto, Financial, Social, News
157
- - HuggingFace models with fallback system
158
- - Real-time analysis with confidence scores
159
- - Score breakdown with progress bars
160
-
161
- ### 2. **Trading Pairs**
162
- - 300+ pairs loaded from `trading_pairs.txt`
163
- - Searchable dropdown/combobox
164
- - Auto-complete functionality
165
- - Used in Per-Asset Sentiment Analysis
166
-
167
- ### 3. **AI Models**
168
- - **Crypto:** CryptoBERT, twitter-roberta
169
- - **Financial:** FinBERT, distilroberta-financial
170
- - **Social:** twitter-roberta-sentiment
171
- - **Fallback:** Lexical keyword-based analysis
172
-
173
- ### 4. **Market Data**
174
- - Real-time prices from CoinGecko
175
- - Fear & Greed Index
176
- - Trending coins
177
- - Historical data storage
178
-
179
- ### 5. **News & Analysis**
180
- - News sentiment analysis
181
- - Database storage (SQLite)
182
- - Related symbols tracking
183
- - Analyzed timestamp
184
-
185
- ---
186
-
187
- ## πŸ”§ Troubleshooting
188
-
189
- ### Models not loading?
190
-
191
- **Check token:**
192
- ```powershell
193
- $env:HF_TOKEN
194
- $env:HF_MODE
195
- ```
196
-
197
- **Solution:** Use `run_server.ps1` which sets them automatically
198
-
199
- ### Charts not displaying?
200
-
201
- **Check:** Browser console (F12) for errors
202
- **Solution:** Make sure internet is connected (CDN for Chart.js)
203
-
204
- ### Trading pairs not showing?
205
-
206
- **Check:** Console should show "Loaded 300 trading pairs"
207
- **Solution:** File `trading_pairs.txt` must exist in root
208
-
209
- ### No news articles?
210
-
211
- **Reason:** Database is empty
212
- **Solution:** Use "News & Financial Sentiment Analysis" to add news
213
-
214
- ---
215
-
216
- ## πŸ“š Documentation
217
-
218
- - **START_HERE.md** - Quick start guide (فارسی)
219
- - **QUICK_START_FA.md** - Fast start guide (فارسی)
220
- - **FINAL_FIXES_SUMMARY.md** - Complete changes summary
221
- - **SET_HF_TOKEN.md** - HF token setup guide
222
- - **HF_SETUP_GUIDE.md** - Complete HF setup
223
-
224
- ---
225
-
226
- ## 🌐 API Endpoints
227
-
228
- ### Core Endpoints
229
- - `GET /` - Main dashboard
230
- - `GET /ai-tools` - AI tools page
231
- - `GET /docs` - API documentation
232
- - `GET /health` - Health check
233
-
234
- ### Market Data
235
- - `GET /api/market` - Current prices
236
- - `GET /api/trending` - Trending coins
237
- - `GET /api/sentiment` - Fear & Greed Index
238
-
239
- ### AI/ML
240
- - `POST /api/sentiment/analyze` - Sentiment analysis
241
- - `POST /api/news/analyze` - News sentiment
242
- - `POST /api/ai/summarize` - Text summarization
243
- - `GET /api/models/status` - Models status
244
- - `GET /api/models/list` - Available models
245
-
246
- ### Resources
247
- - `GET /api/providers` - API providers
248
- - `GET /api/resources` - Resources summary
249
- - `GET /api/news` - News articles
250
-
251
- ---
252
-
253
- ## 🎨 UI Features
254
-
255
- - πŸŒ“ Dark theme optimized
256
- - πŸ“± Responsive design
257
- - ✨ Smooth animations
258
- - 🎯 Interactive charts
259
- - πŸ” Search & filters
260
- - πŸ“Š Real-time updates
261
-
262
- ---
263
-
264
- ## πŸš€ Deployment
265
-
266
- ### Hugging Face Space
267
-
268
- 1. Push code to HF Space
269
- 2. Add secrets:
270
- - `HF_TOKEN` = `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`
271
- - `HF_MODE` = `public`
272
- 3. Restart Space
273
- 4. Done!
274
-
275
- ### Local
276
-
277
- ```powershell
278
- .\run_server.ps1
279
- ```
280
-
281
- ---
282
-
283
- ## πŸ“ˆ Performance
284
-
285
- - **Models:** 4+ loaded (with fallback)
286
- - **API Sources:** 10+ providers
287
- - **Trading Pairs:** 300+
288
- - **Response Time:** < 200ms (cached)
289
- - **First Load:** 30-60s (model loading)
290
-
291
- ---
292
-
293
- ## πŸ” Security
294
-
295
- - βœ… Token stored in environment variables
296
- - βœ… CORS configured
297
- - βœ… Rate limiting (planned)
298
- - ⚠️ **Never commit tokens to git**
299
- - ⚠️ **Use secrets for production**
300
-
301
- ---
302
-
303
- ## πŸ“ License
304
-
305
- This project is for educational and research purposes.
306
-
307
- ---
308
-
309
- ## πŸ™ Credits
310
-
311
- - **HuggingFace** - AI Models
312
- - **CoinGecko** - Market Data
313
- - **Alternative.me** - Fear & Greed Index
314
- - **FastAPI** - Backend Framework
315
- - **Chart.js** - Visualizations
316
-
317
- ---
318
-
319
- ## πŸ“ž Support
320
-
321
- **Quick Issues?**
322
- 1. Run: `python test_fixes.py`
323
- 2. Check: Browser console (F12)
324
- 3. Review: `FINAL_FIXES_SUMMARY.md`
325
-
326
- **Ready to start?**
327
- ```powershell
328
- .\run_server.ps1
329
- ```
330
-
331
- ---
332
-
333
- **Version:** 5.2.0
334
- **Status:** βœ… Ready for production
335
- **Last Updated:** November 19, 2025
336
-
337
- ---
338
-
339
- Made with ❀️ for the Crypto Community πŸš€
 
 
 
 
 
1
+ ---
2
+ sdk: docker
3
+ pinned: true
4
+ ---
5
+ # πŸš€ Crypto Intelligence Hub
6
+
7
+ AI-Powered Cryptocurrency Data Collection & Analysis Center
8
+
9
+ ---
10
+
11
+ ## ⚑ Quick Start
12
+
13
+ ### One Command to Run Everything:
14
+
15
+ ```powershell
16
+ .\run_server.ps1
17
+ ```
18
+
19
+ That's it! The script will:
20
+ - βœ… Set HF_TOKEN environment variable
21
+ - βœ… Run system tests
22
+ - βœ… Start the server
23
+
24
+ Then open: **http://localhost:7860/**
25
+
26
+ ---
27
+
28
+ ## πŸ“‹ What's Included
29
+
30
+ ### ✨ Features
31
+
32
+ - πŸ€– **AI Sentiment Analysis** - Using Hugging Face models
33
+ - πŸ“Š **Market Data** - Real-time crypto prices from CoinGecko
34
+ - πŸ“° **News Analysis** - Sentiment analysis on crypto news
35
+ - πŸ’Ή **Trading Pairs** - 300+ pairs with searchable dropdown
36
+ - πŸ“ˆ **Charts & Visualizations** - Interactive data charts
37
+ - πŸ” **Provider Management** - Track API providers status
38
+
39
+ ### 🎨 Pages
40
+
41
+ - **Main Dashboard** (`/`) - Overview and statistics
42
+ - **AI Tools** (`/ai-tools`) - Standalone sentiment & summarization tools
43
+ - **API Docs** (`/docs`) - FastAPI auto-generated documentation
44
+
45
+ ---
46
+
47
+ ## πŸ› οΈ Setup
48
+
49
+ ### Prerequisites
50
+
51
+ - Python 3.8+
52
+ - Internet connection (for HF models & APIs)
53
+
54
+ ### Installation
55
+
56
+ 1. **Clone/Download** this repository
57
+
58
+ 2. **Install dependencies:**
59
+ ```bash
60
+ pip install -r requirements.txt
61
+ ```
62
+
63
+ 3. **Run the server:**
64
+ ```powershell
65
+ .\run_server.ps1
66
+ ```
67
+
68
+ ---
69
+
70
+ ## πŸ”‘ Configuration
71
+
72
+ ### Hugging Face Token
73
+
74
+ Your HF token is already configured in `run_server.ps1`:
75
+ ```
76
+ HF_TOKEN: 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
77
+ HF_MODE: public
78
+ ```
79
+
80
+ For Hugging Face Space deployment:
81
+ 1. Go to: Settings β†’ Repository secrets
82
+ 2. Add: `HF_TOKEN` = `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`
83
+ 3. Add: `HF_MODE` = `public`
84
+ 4. Restart Space
85
+
86
+ ---
87
+
88
+ ## πŸ“ Project Structure
89
+
90
+ ```
91
+ .
92
+ β”œβ”€β”€ api_server_extended.py # Main FastAPI server
93
+ β”œβ”€β”€ ai_models.py # HF models & sentiment analysis
94
+ β”œβ”€β”€ config.py # Configuration
95
+ β”œβ”€β”€ index.html # Main dashboard UI
96
+ β”œβ”€β”€ ai_tools.html # Standalone AI tools page
97
+ β”œβ”€β”€ static/
98
+ β”‚ β”œβ”€β”€ css/
99
+ β”‚ β”‚ └── main.css # Styles
100
+ β”‚ └── js/
101
+ β”‚ β”œβ”€β”€ app.js # Main JavaScript
102
+ β”‚ └── trading-pairs-loader.js # Trading pairs loader
103
+ β”œβ”€β”€ trading_pairs.txt # 300+ trading pairs
104
+ β”œβ”€β”€ run_server.ps1 # Start script (Windows)
105
+ β”œβ”€β”€ test_fixes.py # System tests
106
+ └── README.md # This file
107
+ ```
108
+
109
+ ---
110
+
111
+ ## πŸ§ͺ Testing
112
+
113
+ ### Run all tests:
114
+ ```bash
115
+ python test_fixes.py
116
+ ```
117
+
118
+ ### Expected output:
119
+ ```
120
+ ============================================================
121
+ [TEST] Testing All Fixes
122
+ ============================================================
123
+ [*] Testing file existence...
124
+ [OK] Found: index.html
125
+ ... (all files)
126
+
127
+ [*] Testing trading pairs file...
128
+ [OK] Found 300 trading pairs
129
+
130
+ [*] Testing AI models configuration...
131
+ [OK] All essential models linked
132
+
133
+ ============================================================
134
+ Overall: 6/6 tests passed (100.0%)
135
+ ============================================================
136
+ [SUCCESS] All tests passed! System is ready to use!
137
+ ```
138
+
139
+ ---
140
+
141
+ ## πŸ“Š Current Test Status
142
+
143
+ Your latest test results:
144
+ ```
145
+ βœ… File Existence - PASS
146
+ βœ… Trading Pairs - PASS
147
+ βœ… Index.html Links - PASS
148
+ βœ… AI Models Config - PASS
149
+ ⚠️ Environment Variables - FAIL (Fixed by run_server.ps1)
150
+ βœ… App.js Functions - PASS
151
+
152
+ Score: 5/6 (83.3%) β†’ Will be 6/6 after running run_server.ps1
153
+ ```
154
+
155
+ ---
156
+
157
+ ## 🎯 Features Overview
158
+
159
+ ### 1. **Sentiment Analysis**
160
+ - 5 modes: Auto, Crypto, Financial, Social, News
161
+ - HuggingFace models with fallback system
162
+ - Real-time analysis with confidence scores
163
+ - Score breakdown with progress bars
164
+
165
+ ### 2. **Trading Pairs**
166
+ - 300+ pairs loaded from `trading_pairs.txt`
167
+ - Searchable dropdown/combobox
168
+ - Auto-complete functionality
169
+ - Used in Per-Asset Sentiment Analysis
170
+
171
+ ### 3. **AI Models**
172
+ - **Crypto:** CryptoBERT, twitter-roberta
173
+ - **Financial:** FinBERT, distilroberta-financial
174
+ - **Social:** twitter-roberta-sentiment
175
+ - **Fallback:** Lexical keyword-based analysis
176
+
177
+ ### 4. **Market Data**
178
+ - Real-time prices from CoinGecko
179
+ - Fear & Greed Index
180
+ - Trending coins
181
+ - Historical data storage
182
+
183
+ ### 5. **News & Analysis**
184
+ - News sentiment analysis
185
+ - Database storage (SQLite)
186
+ - Related symbols tracking
187
+ - Analyzed timestamp
188
+
189
+ ---
190
+
191
+ ## πŸ”§ Troubleshooting
192
+
193
+ ### Models not loading?
194
+
195
+ **Check token:**
196
+ ```powershell
197
+ $env:HF_TOKEN
198
+ $env:HF_MODE
199
+ ```
200
+
201
+ **Solution:** Use `run_server.ps1` which sets them automatically
202
+
203
+ ### Charts not displaying?
204
+
205
+ **Check:** Browser console (F12) for errors
206
+ **Solution:** Make sure internet is connected (CDN for Chart.js)
207
+
208
+ ### Trading pairs not showing?
209
+
210
+ **Check:** Console should show "Loaded 300 trading pairs"
211
+ **Solution:** File `trading_pairs.txt` must exist in root
212
+
213
+ ### No news articles?
214
+
215
+ **Reason:** Database is empty
216
+ **Solution:** Use "News & Financial Sentiment Analysis" to add news
217
+
218
+ ---
219
+
220
+ ## πŸ“š Documentation
221
+
222
+ - **START_HERE.md** - Quick start guide (فارسی)
223
+ - **QUICK_START_FA.md** - Fast start guide (فارسی)
224
+ - **FINAL_FIXES_SUMMARY.md** - Complete changes summary
225
+ - **SET_HF_TOKEN.md** - HF token setup guide
226
+ - **HF_SETUP_GUIDE.md** - Complete HF setup
227
+
228
+ ---
229
+
230
+ ## 🌐 API Endpoints
231
+
232
+ ### Core Endpoints
233
+ - `GET /` - Main dashboard
234
+ - `GET /ai-tools` - AI tools page
235
+ - `GET /docs` - API documentation
236
+ - `GET /health` - Health check
237
+
238
+ ### Market Data
239
+ - `GET /api/market` - Current prices
240
+ - `GET /api/trending` - Trending coins
241
+ - `GET /api/sentiment` - Fear & Greed Index
242
+
243
+ ### AI/ML
244
+ - `POST /api/sentiment/analyze` - Sentiment analysis
245
+ - `POST /api/news/analyze` - News sentiment
246
+ - `POST /api/ai/summarize` - Text summarization
247
+ - `GET /api/models/status` - Models status
248
+ - `GET /api/models/list` - Available models
249
+
250
+ ### Resources
251
+ - `GET /api/providers` - API providers
252
+ - `GET /api/resources` - Resources summary
253
+ - `GET /api/news` - News articles
254
+
255
+ ---
256
+
257
+ ## 🎨 UI Features
258
+
259
+ - πŸŒ“ Dark theme optimized
260
+ - πŸ“± Responsive design
261
+ - ✨ Smooth animations
262
+ - 🎯 Interactive charts
263
+ - πŸ” Search & filters
264
+ - πŸ“Š Real-time updates
265
+
266
+ ---
267
+
268
+ ## πŸš€ Deployment
269
+
270
+ ### Hugging Face Space
271
+
272
+ 1. Push code to HF Space
273
+ 2. Add secrets:
274
+ - `HF_TOKEN` = `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`
275
+ - `HF_MODE` = `public`
276
+ 3. Restart Space
277
+ 4. Done!
278
+
279
+ ### Local
280
+
281
+ ```powershell
282
+ .\run_server.ps1
283
+ ```
284
+
285
+ ---
286
+
287
+ ## πŸ“ˆ Performance
288
+
289
+ - **Models:** 4+ loaded (with fallback)
290
+ - **API Sources:** 10+ providers
291
+ - **Trading Pairs:** 300+
292
+ - **Response Time:** < 200ms (cached)
293
+ - **First Load:** 30-60s (model loading)
294
+
295
+ ---
296
+
297
+ ## πŸ” Security
298
+
299
+ - βœ… Token stored in environment variables
300
+ - βœ… CORS configured
301
+ - βœ… Rate limiting (planned)
302
+ - ⚠️ **Never commit tokens to git**
303
+ - ⚠️ **Use secrets for production**
304
+
305
+ ---
306
+
307
+ ## πŸ“ License
308
+
309
+ This project is for educational and research purposes.
310
+
311
+ ---
312
+
313
+ ## πŸ™ Credits
314
+
315
+ - **HuggingFace** - AI Models
316
+ - **CoinGecko** - Market Data
317
+ - **Alternative.me** - Fear & Greed Index
318
+ - **FastAPI** - Backend Framework
319
+ - **Chart.js** - Visualizations
320
+
321
+ ---
322
+
323
+ ## πŸ“ž Support
324
+
325
+ **Quick Issues?**
326
+ 1. Run: `python test_fixes.py`
327
+ 2. Check: Browser console (F12)
328
+ 3. Review: `FINAL_FIXES_SUMMARY.md`
329
+
330
+ **Ready to start?**
331
+ ```powershell
332
+ .\run_server.ps1
333
+ ```
334
+
335
+ ---
336
+
337
+ **Version:** 5.2.0
338
+ **Status:** βœ… Ready for production
339
+ **Last Updated:** November 19, 2025
340
+
341
+ ---
342
+
343
+ Made with ❀️ for the Crypto Community πŸš€