Spaces:
Running
Running
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 | |