Skip to content

AI-powered financial analysis assistant that answers natural language questions using fine-tuned Flan-T5 and real-time chat.

License

Notifications You must be signed in to change notification settings

Efe-Eroglu/FinAnalyst-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 FinAnalyst — Akıllı Finansal Soru-Cevap Asistanı

React FastAPI Python License

FinAnalyst, finansal tabloları analiz eden ve kullanıcıların İngilizce sorularına doğru ve açıklayıcı cevaplar üreten yapay zeka destekli bir soru-cevap asistanıdır.

🌟 Özellikler

🤖 AI Destekli Analiz

  • Google Flan-T5-Large modeli ile güçlendirilmiş
  • Finansal tabloları anlama ve analiz etme
  • Doğal dil ile soru-cevap
  • Detaylı finansal hesaplamalar

💬 Real-Time Chat

  • WebSocket tabanlı gerçek zamanlı iletişim
  • Anlık mesajlaşma deneyimi
  • Dosya yükleme ve analiz
  • Bağlantı durumu takibi

🎨 Modern UI/UX

  • Responsive tasarım
  • Framer Motion animasyonları
  • Glassmorphism efektleri
  • Tailwind CSS ile modern stil

🔒 Güvenlik

  • CORS koruması
  • Input validasyonu
  • Rate limiting
  • Güvenli dosya işleme

🏗️ Proje Yapısı

finalayst/
├── Frontend/                 # React Frontend
│   ├── public/
│   ├── src/
│   │   ├── components/      # UI Bileşenleri
│   │   ├── pages/          # Sayfa Bileşenleri
│   │   ├── services/       # API Servisleri
│   │   └── utils/          # Yardımcı Fonksiyonlar
│   ├── package.json
│   └── tailwind.config.js
├── Backend/                  # FastAPI Backend
│   ├── app/
│   │   ├── api/            # API Endpoints
│   │   ├── core/           # Konfigürasyon
│   │   ├── models/         # Pydantic Modeller
│   │   ├── services/       # İş Mantığı
│   │   └── utils/          # Yardımcı Fonksiyonlar
│   ├── requirements.txt
│   └── Dockerfile
└── README.md

🏠 Ana Sayfa

hero

💬 Chat Arayüzü

chat

🚀 Hızlı Başlangıç

1. Projeyi Klonlayın

git clone https://github.com/Efe-Eroglu/FinAnalyst-Chatbot.git
cd finqa

2. Frontend Kurulumu

cd Frontend
npm install
npm start

Frontend: http://localhost:3000

3. Backend Kurulumu

cd Backend
pip install -r requirements.txt
uvicorn app.main:app --reload

Backend: http://localhost:8000

4. Model Kurulumu

# Model dosyalarını /models/finbot-peft-model/ klasörüne yerleştirin
mkdir -p /models/finbot-peft-model/
# Model dosyalarınızı buraya kopyalayın

📋 API Endpoints

Chat Endpoints

  • POST /api/v1/chat - Mesaj gönderme
  • GET /api/v1/health - Sağlık kontrolü
  • GET /api/v1/model-info - Model bilgileri

WebSocket Endpoints

  • WS /ws/chat - Real-time chat

Dokümantasyon

🧠 Model Bilgileri

Model Özellikleri

  • Model: google/flan-t5-large
  • Mimari: Encoder-Decoder (text-to-text)
  • Parametreler: ~770M
  • Fine-tuning: PEFT (Parameter Efficient Fine-tuning)

Input Format

Table: [finansal tablo verisi]
Context: [ek bağlam]
Question: [kullanıcı sorusu]

Output Format

[Doğal dil yanıtı]

🛠️ Geliştirme

Frontend Geliştirme

cd Frontend
npm run dev          # Geliştirme sunucusu
npm run build        # Production build

Backend Geliştirme

cd Backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
black .              # Kod formatı
flake8 .             # Linting

Docker ile Çalıştırma

# Backend
cd Backend
docker build -t finanalyst-backend .
docker run -p 8000:8000 finanalyst-backend

# Frontend
cd Frontend
docker build -t finanalyst-frontend .
docker run -p 3000:3000 finanalyst-frontend

🔧 Konfigürasyon

Environment Variables

# Backend (.env)
HOST=0.0.0.0
PORT=8000
DEBUG=true
MODEL_PATH=/models/finbot-peft-model/
MAX_INPUT_LENGTH=512
MAX_OUTPUT_LENGTH=128
TEMPERATURE=0.7
TOP_P=0.95
SECRET_KEY=your-secret-key

CORS Ayarları

BACKEND_CORS_ORIGINS=[
    "http://localhost:3000",
    "http://localhost:3001"
]

📊 Performans

Model Performansı

  • Inference Time: ~2-5 saniye
  • Memory Usage: ~4GB RAM
  • GPU: Önerilen (12GB+ VRAM)

API Performansı

  • Response Time: < 5 saniye
  • Concurrent Users: 100+
  • Rate Limit: 60 istek/dakika

🧪 Test

Frontend Testleri

cd Frontend
npm test
npm run test:coverage

Backend Testleri

cd Backend
pytest tests/
pytest --cov=app tests/

📦 Deployment

Production Build

# Frontend
cd Frontend
npm run build

# Backend
cd Backend
gunicorn app.main:app -w 4 -k uvicorn.workers.UvicornWorker

Docker Compose

version: '3.8'
services:
  frontend:
    build: ./Frontend
    ports:
      - "3000:3000"
  
  backend:
    build: ./Backend
    ports:
      - "8000:8000"
    volumes:
      - ./models:/models

🤝 Katkıda Bulunma

  1. Fork yapın
  2. Feature branch oluşturun (git checkout -b feature/amazing-feature)
  3. Commit yapın (git commit -m 'Add amazing feature')
  4. Push yapın (git push origin feature/amazing-feature)
  5. Pull Request açın

📝 Lisans

Bu proje MIT lisansı altında lisanslanmıştır. Detaylar için LICENSE dosyasına bakın.

👨‍💻 Geliştirici

Efe Eroğlu

📞 İletişim

Proje hakkında sorularınız için:


Made with by Efe Eroğlu

FinAnalyst - Akıllı Finansal Soru-Cevap Asistanı

About

AI-powered financial analysis assistant that answers natural language questions using fine-tuned Flan-T5 and real-time chat.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published