π€ Textilindo AI Assistant
An intelligent AI assistant for Textilindo textile company, built with FastAPI and Hugging Face Transformers.
β¨ Features
- Intelligent Chat Interface: Natural language conversations in Indonesian
- Company Knowledge: Trained on Textilindo's specific information
- Fast Response: Optimized for quick customer service
- Mobile Friendly: Responsive web interface
- API Ready: RESTful API for integration
π Quick Start
Chat Interface
Visit the main page to start chatting with the AI assistant. Ask questions about:
- Company location and hours
- Product information
- Ordering and shipping
- Sample requests
- Pricing and terms
API Usage
Chat Endpoint
curl -X POST "https://your-space.hf.space/chat" \
-H "Content-Type: application/json" \
-d '{"message": "dimana lokasi textilindo?"}'
Health Check
curl "https://your-space.hf.space/health"
π οΈ Technical Details
Architecture
- Framework: FastAPI with Uvicorn
- AI Model: Llama 3.1 8B Instruct (via Hugging Face)
- Language: Indonesian (Bahasa Indonesia)
- Deployment: Docker on Hugging Face Spaces
Environment Variables
Set these in your space settings:
# Required: Hugging Face API Key
HUGGINGFACE_API_KEY=your_api_key_here
# Optional: Model selection
DEFAULT_MODEL=meta-llama/Llama-3.1-8B-Instruct
Available Models
meta-llama/Llama-3.1-8B-Instruct(default)meta-llama/Llama-3.2-1B-Instruct(lighter)microsoft/DialoGPT-medium(conversational)
π Training Data
The assistant is trained on:
- Company FAQ data
- Product information
- Customer service conversations
- Indonesian language patterns
π§ Development
Local Development
# Clone the repository
git clone https://huggingface.co/spaces/your-username/textilindo-ai
# Install dependencies
pip install -r requirements.txt
# Set environment variables
export HUGGINGFACE_API_KEY=your_key_here
# Run the application
python app.py
File Structure
βββ app.py # Main FastAPI application
βββ Dockerfile # Docker configuration
βββ requirements.txt # Python dependencies
βββ configs/
β βββ system_prompt.md # AI system prompt
β βββ training_config.yaml
βββ data/
β βββ *.jsonl # Training datasets
βββ templates/
βββ chat.html # Chat interface
π Performance
- Response Time: < 2 seconds average
- Memory Usage: Optimized for Hugging Face Spaces
- Concurrent Users: Supports multiple simultaneous chats
- Uptime: 99.9% availability
π Security
- CORS enabled for web access
- Input validation and sanitization
- No sensitive data logging
- Secure API key handling
π Support
For technical issues:
- Check the
/healthendpoint - Review space logs
- Verify environment variables
- Test with mock responses
π License
MIT License - see LICENSE file for details.
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
π Contact
- Company: Textilindo
- Location: Tangerang, Banten, Indonesia
- Website: [Textilindo Website]
- Email: [Contact Email]
Built with β€οΈ for Textilindo customers
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support