Spaces:
Running
Running
File size: 3,410 Bytes
a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 85cb7be c02fe07 a33b0e1 9b006e9 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 a33b0e1 c02fe07 9b006e9 c02fe07 9b006e9 c02fe07 9b006e9 c02fe07 a33b0e1 c02fe07 a33b0e1 f104fee c02fe07 |
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 116 117 118 119 120 |
---
title: Web3 Research Co-Pilot
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
app_file: app.py
dockerfile: Dockerfile
license: mit
tags:
- cryptocurrency
- blockchain
- defi
- ai-research
- ollama
- llama3
pinned: false
header: default
short_description: AI-powered crypto research with real-time blockchain data
suggested_hardware: t4-medium
---
# Web3 Research Co-Pilot π
An AI-powered cryptocurrency research assistant that provides real-time blockchain analytics, DeFi insights, and market intelligence using Llama 8B and comprehensive API integrations.
## β¨ Features
- **π€ AI-Powered Analysis**: Uses Llama 8B model via Ollama for intelligent responses
- **π Real-Time Data**: Integrates with CryptoCompare, DeFiLlama, Etherscan APIs
- **π‘οΈ AI Safety**: Built-in content filtering and safety guardrails
- **π Interactive UI**: Modern web interface with dark/light themes
- **β‘ Streaming Responses**: Real-time progress updates during analysis
- **π Comprehensive Tools**: 5+ specialized cryptocurrency research tools
## π οΈ Technical Stack
- **Backend**: FastAPI with Python 3.11
- **AI Model**: Llama 3 8B via Ollama (local inference)
- **Frontend**: Vanilla JavaScript with modern CSS
- **APIs**: CryptoCompare, DeFiLlama, Etherscan, CoinGecko
- **Safety**: Custom AI safety module with content filtering
- **Deployment**: Docker for HuggingFace Spaces
## π Usage
Ask questions like:
- "Analyze Bitcoin price trends and institutional adoption patterns"
- "Compare top DeFi protocols by TVL and yield metrics"
- "What are the current Ethereum gas fees?"
- "Track whale movements in Bitcoin today"
## π§ Development
### Local Setup
```bash
# Clone the repository
git clone https://huggingface.co/spaces/your-username/web3-research-copilot
cd web3-research-copilot
# Install dependencies
pip install -r requirements.txt
# Start Ollama (in separate terminal)
ollama serve
ollama pull llama3:8b
# Run the application
python app.py
```
### Docker Deployment
```bash
# Build and run with Docker
docker build -f Dockerfile.hf -t web3-copilot .
docker run -p 7860:7860 -p 11434:11434 web3-copilot
```
## π Project Structure
```
βββ app.py # Main FastAPI application
βββ templates/ # HTML templates
βββ static/ # CSS and JavaScript files
βββ src/
β βββ agent/ # AI research agent
β βββ tools/ # API integration tools
β βββ utils/ # Configuration and safety
βββ Dockerfile.hf # HuggingFace Spaces Docker config
βββ requirements.txt # Python dependencies
```
## π‘οΈ AI Safety Features
- Input sanitization and validation
- Rate limiting protection
- Content filtering for harmful requests
- Response safety validation
- Comprehensive logging for monitoring
## π Supported APIs
- **CryptoCompare**: Price data and market statistics
- **DeFiLlama**: Protocol TVL and DeFi analytics
- **Etherscan**: Ethereum network data and gas prices
- **CoinGecko**: Cryptocurrency market data
- **Custom Chart Data**: Historical price analysis
## π€ Contributing
This project implements responsible AI practices and focuses on legitimate cryptocurrency research and education.
## π License
MIT License - see LICENSE file for details
---
Built with β€οΈ for the crypto research community
|