File size: 2,362 Bytes
d6d843f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dfb6cf1
d6d843f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dfb6cf1
d6d843f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# CryptoBERT Quick Reference Card

## πŸš€ Quick Start (3 Steps)

```bash

# 1. Setup environment

./setup_cryptobert.sh



# 2. Test integration

python3 test_cryptobert.py



# 3. Use in code

python3 -c "import ai_models; ai_models.initialize_models(); print(ai_models.analyze_crypto_sentiment('Bitcoin bullish trend'))"

```

---

## πŸ“‹ Model Info

| Item | Value |
|------|-------|
| **Model** | ElKulako/CryptoBERT |
| **ID** | `hf_model_elkulako_cryptobert` |
| **Token** | `hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` |
| **Status** | CONDITIONALLY_AVAILABLE |



---



## πŸ’» Code Snippets



### Initialize Models

```python

import ai_models
result = ai_models.initialize_models()
print(f"CryptoBERT: {result['models']['crypto_sentiment']}")
```



### Analyze Sentiment

```python

sentiment = ai_models.analyze_crypto_sentiment("Bitcoin moon incoming")

print(f"{sentiment['label']}: {sentiment['score']:.2%}")

```

### Get Model Info
```python

info = ai_models.get_model_info()

print(f"Loaded: {info['loaded_models']['crypto_sentiment']}")

```

---

## πŸ”§ Commands

### Setup
```bash

export HF_TOKEN="hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

./setup_cryptobert.sh

```

### Test
```bash

python3 test_cryptobert.py

```

### Verify
```bash

python3 -c "import config; print(config.HF_USE_AUTH_TOKEN)"

```

---

## πŸ“ Files Created

```

setup_cryptobert.sh              - Setup script

test_cryptobert.py               - Test suite

docs/CRYPTOBERT_INTEGRATION.md   - Full docs

CRYPTOBERT_SETUP_COMPLETE.md     - Setup guide

INTEGRATION_SUMMARY.md           - Summary

CRYPTOBERT_QUICK_REFERENCE.md    - This file

```

---

## πŸ› Troubleshooting

| Problem | Solution |
|---------|----------|
| Model not loading | `./setup_cryptobert.sh` |
| Auth failure | `echo $HF_TOKEN` |
| Slow inference | Check GPU: `torch.cuda.is_available()` |
| Import error | `pip install transformers torch` |

---

## πŸ“š Documentation

- **Full Guide**: `docs/CRYPTOBERT_INTEGRATION.md`
- **Summary**: `INTEGRATION_SUMMARY.md`
- **Setup**: `CRYPTOBERT_SETUP_COMPLETE.md`

---

## βœ… Status

```

βœ“ Configuration: Complete

βœ“ Authentication: Configured

βœ“ Integration: Active

βœ“ Testing: Ready

βœ“ Documentation: Complete

```

**Next**: Run `python3 test_cryptobert.py` 🎯