Textilindo-2 / README.md
harismlnaslm's picture
Fix Docker issues: Switch to lightweight RAG-based API without heavy ML dependencies
cb197a6
metadata
title: Textilindo AI Assistant
emoji: 🤖
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
license: mit
app_port: 7860

🤖 Textilindo AI Assistant API

AI-powered customer service API for Textilindo, a textile company. This REST API provides accurate and helpful information about Textilindo's products, services, and business information.

Features

  • REST API: Clean HTTP endpoints for integration
  • Smart Q&A: Ask questions about Textilindo's products and services
  • Knowledge Base: Trained on 184 examples of Textilindo-specific information
  • Multilingual Support: Responds in Indonesian and English
  • RAG Integration: Uses Retrieval-Augmented Generation with similarity matching

API Endpoints

POST /chat

Send a message to the AI assistant.

Request Body:

{
  "message": "Dimana lokasi Textilindo?",
  "max_tokens": 300,
  "temperature": 0.7,
  "system_prompt": "Optional custom system prompt"
}

Response:

{
  "success": true,
  "response": "Textilindo berkantor pusat di Jl. Raya Prancis No.39, Kosambi Tim., Kec. Kosambi, Kabupaten Tangerang, Banten 15213",
  "context_used": true,
  "relevant_examples_count": 3,
  "model": "textilindo-rag",
  "tokens_used": 150
}

GET /health

Health check endpoint.

GET /stats

Get dataset and system statistics.

Example Questions:

  • "Dimana lokasi Textilindo?"
  • "Apa saja produk yang dijual di Textilindo?"
  • "Jam berapa Textilindo buka?"
  • "Bagaimana cara menghubungi Textilindo?"

Technical Details

  • Framework: Flask + Python
  • Dataset: 184 training examples
  • Model: RAG-based similarity matching
  • Deployment: Docker container on Hugging Face Spaces
  • Inference: Lightweight similarity matching (no heavy ML dependencies)

Dataset Sources

  • lora_dataset_20250829_113330.jsonl: 33 examples
  • lora_dataset_20250910_145055.jsonl: 115 examples
  • textilindo_training_data.jsonl: 33 examples
  • training_data.jsonl: 3 examples

Total: 184 examples

Development

This application uses:

  • Gradio for the web interface
  • SequenceMatcher for similarity matching
  • JSONL datasets for knowledge base
  • Docker for containerization

Status

Running - The application is fully functional and ready to use!