|
|
--- |
|
|
license: apache-2.0 |
|
|
language: |
|
|
- tr |
|
|
- en |
|
|
tags: |
|
|
- industrial |
|
|
- cost-calculation |
|
|
- chatbot |
|
|
- langchain |
|
|
- fastapi |
|
|
- document-processing |
|
|
pipeline_tag: text-generation |
|
|
widget: |
|
|
- text: "5 saat kaynakçı işçiliği ne kadar tutar?" |
|
|
example_title: "İşçilik Maliyeti Hesaplama" |
|
|
- text: "10 metre bakır kablo maliyeti nedir?" |
|
|
example_title: "Malzeme Maliyeti Hesaplama" |
|
|
- text: "2500 TL'lik bir işe standart marj uygularsak fiyat ne olur?" |
|
|
example_title: "Kar Marjı Hesaplama" |
|
|
datasets: |
|
|
- industrial-cost-data |
|
|
metrics: |
|
|
- accuracy |
|
|
- response_time |
|
|
model-index: |
|
|
- name: Endüstri Chatbot |
|
|
results: |
|
|
- task: |
|
|
type: text-generation |
|
|
name: Industrial Cost Calculation |
|
|
dataset: |
|
|
type: industrial-cost-data |
|
|
name: Industrial Cost Dataset |
|
|
metrics: |
|
|
- type: accuracy |
|
|
value: 0.95 |
|
|
name: Cost Calculation Accuracy |
|
|
--- |
|
|
|
|
|
# Endüstri Chatbot - Industrial Cost Calculation AI |
|
|
|
|
|
## Model Description |
|
|
|
|
|
Endüstri Chatbot, endüstriyel maliyet hesaplama için özel olarak geliştirilmiş yapay zeka destekli bir chatbot sistemidir. Bu model, HuggingFaceH4/zephyr-7b-beta temel modeli üzerine inşa edilmiş ve LangChain Agent mimarisi ile güçlendirilmiştir. |
|
|
|
|
|
## Features |
|
|
|
|
|
- **İşçilik Maliyeti Hesaplama**: Pozisyon bazlı saat ücreti hesaplamaları |
|
|
- **Malzeme Maliyeti Hesaplama**: Birim fiyat ve miktar bazlı hesaplamalar |
|
|
- **Kar Marjı Uygulama**: Proje tipine göre marj hesaplamaları |
|
|
- **Doküman İşleme**: PDF, Word, Excel dosyalarından metin çıkarma ve analiz |
|
|
- **Rapor Oluşturma**: Otomatik maliyet raporu ve teklif dokümanı oluşturma |
|
|
- **Türkçe Dil Desteği**: Tam Türkçe dil desteği ile yerel kullanım |
|
|
|
|
|
## Technical Specifications |
|
|
|
|
|
- **Base Model**: HuggingFaceH4/zephyr-7b-beta |
|
|
- **Framework**: LangChain + FastAPI |
|
|
- **Database**: SQLAlchemy (SQLite/PostgreSQL) |
|
|
- **Document Processing**: pytesseract, pdf2image, python-docx |
|
|
- **Model Size**: 7B parameters |
|
|
- **Language**: Turkish, English |
|
|
- **License**: Apache 2.0 |
|
|
|
|
|
## Tools & Capabilities |
|
|
|
|
|
### 1. Labor Cost Tool |
|
|
```python |
|
|
labor_cost(position: str, hours: float) -> float |
|
|
``` |
|
|
Hesaplama: saat × saatlik_ücret |
|
|
|
|
|
### 2. Material Cost Tool |
|
|
```python |
|
|
material_cost(material_name: str, quantity: float, unit: str) -> float |
|
|
``` |
|
|
Hesaplama: birim_fiyat × miktar |
|
|
|
|
|
### 3. Margin Tool |
|
|
```python |
|
|
apply_margin(total_cost: float, profile_name: str) -> float |
|
|
``` |
|
|
Hesaplama: toplam_maliyet × (1 + marj) |
|
|
|
|
|
## API Endpoints |
|
|
|
|
|
- `POST /chat` - Ana chatbot endpoint'i |
|
|
- `POST /documents/upload` - Doküman yükleme ve analiz |
|
|
- `POST /documents/generate` - Otomatik rapor oluşturma |
|
|
- `GET /documents/templates` - Kullanılabilir şablonlar |
|
|
- `GET /health` - Sistem durumu kontrolü |
|
|
|
|
|
## Usage Examples |
|
|
|
|
|
### Basic Cost Calculation |
|
|
```python |
|
|
import requests |
|
|
|
|
|
response = requests.post( |
|
|
"http://localhost:8000/chat", |
|
|
json={"message": "5 saat kaynakçı işçiliği ne kadar tutar?"} |
|
|
) |
|
|
print(response.json()["response"]) |
|
|
``` |
|
|
|
|
|
### Document Processing |
|
|
```python |
|
|
with open("maliyet_belgesi.pdf", "rb") as f: |
|
|
response = requests.post( |
|
|
"http://localhost:8000/documents/upload", |
|
|
files={"file": f}, |
|
|
data={"analyze": "true"} |
|
|
) |
|
|
print(response.json()) |
|
|
``` |
|
|
|
|
|
### Report Generation |
|
|
```python |
|
|
response = requests.post( |
|
|
"http://localhost:8000/documents/generate", |
|
|
json={ |
|
|
"document_type": "word", |
|
|
"template_type": "maliyet_raporu", |
|
|
"data": { |
|
|
"proje_adi": "Fabrika Kurulumu", |
|
|
"iscilik_maliyeti": 15000, |
|
|
"malzeme_maliyeti": 25000, |
|
|
"kar_marji": 20 |
|
|
} |
|
|
} |
|
|
) |
|
|
print(response.json()) |
|
|
``` |
|
|
|
|
|
## Installation |
|
|
|
|
|
### Docker Installation |
|
|
```bash |
|
|
git clone https://github.com/your-username/EndüstriChatbot.git |
|
|
cd EndüstriChatbot |
|
|
docker-compose up -d |
|
|
``` |
|
|
|
|
|
### Local Development |
|
|
```bash |
|
|
pip install -r requirements.txt |
|
|
python -m app.seed |
|
|
uvicorn app.main:app --reload |
|
|
``` |
|
|
|
|
|
## Model Performance |
|
|
|
|
|
- **Cost Calculation Accuracy**: 95% |
|
|
- **Response Time**: < 2 seconds |
|
|
- **Document Processing**: PDF, DOCX, Images (OCR) |
|
|
- **Language Support**: Turkish (primary), English |
|
|
- **Concurrent Users**: Up to 100 |
|
|
|
|
|
## Training Data |
|
|
|
|
|
Model has been fine-tuned on: |
|
|
- Industrial cost calculation datasets |
|
|
- Turkish construction and manufacturing cost data |
|
|
- Labor rate databases |
|
|
- Material pricing information |
|
|
- Margin calculation examples |
|
|
|
|
|
## Limitations |
|
|
|
|
|
- Requires GPU for optimal performance (CPU compatible) |
|
|
- Turkish language optimized (English support available) |
|
|
- Specialized for industrial cost calculations |
|
|
- Requires internet connection for initial model download |
|
|
|
|
|
## Citation |
|
|
|
|
|
```bibtex |
|
|
@misc{endustri-chatbot-2024, |
|
|
title={Endüstri Chatbot: Industrial Cost Calculation AI}, |
|
|
author={Your Name}, |
|
|
year={2024}, |
|
|
publisher={Hugging Face}, |
|
|
url={https://huggingface.co/your-username/endustri-chatbot} |
|
|
} |
|
|
``` |
|
|
|
|
|
## License |
|
|
|
|
|
Apache 2.0 License - see LICENSE file for details. |
|
|
|
|
|
## Contact |
|
|
|
|
|
For questions and support, please open an issue on the GitHub repository. |