help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
multi-language-chatbot
RSK World
multi-language-chatbot
Multi-language Chatbot - Python + Flask + OpenAI API + NLP + Translation + Language Detection + Cultural Adaptation
multi-language-chatbot
  • __pycache__
  • instance
  • languages
  • logs
  • modules
  • static
  • templates
  • tests
  • .env.example1.1 KB
  • .gitignore2 KB
  • GITHUB_RELEASE_TEMPLATE.md3.3 KB
  • LICENSE1.2 KB
  • README.md9.3 KB
  • RELEASE_NOTES.md6.4 KB
  • app.py18.5 KB
  • config.py4.2 KB
  • manifest.ini2.5 KB
  • requirements.txt1.6 KB
  • run.py2.9 KB
  • setup.py3.1 KB
script.jsrun.py
run.py
Raw Download
Find: Go to:
#!/usr/bin/env python3
"""
Multi-language Chatbot Runner
Author: RSK World (https://rskworld.in)
Founder: Molla Samser
Designer & Tester: Rima Khatun
Contact: help@rskworld.in, +91 93305 39277
Year: 2026
Description: Application runner for multi-language chatbot
"""

import os
import sys
from app import app
from config import get_config

def create_app():
    """Create and configure the Flask application"""
    config_class = get_config()
    app.config.from_object(config_class)
    
    # Initialize app with configuration
    config_class.init_app(app)
    
    return app

def main():
    """Main entry point"""
    # Ensure we're in the right directory
    script_dir = os.path.dirname(os.path.abspath(__file__))
    os.chdir(script_dir)
    
    # Create necessary directories
    os.makedirs('logs', exist_ok=True)
    os.makedirs('instance', exist_ok=True)
    
    # Get configuration
    config_class = get_config()
    
    print("=" * 60)
    print("Multi-language Chatbot")
    print("Powered by RSK World (https://rskworld.in)")
    print("Founder: Molla Samser")
    print("Designer & Tester: Rima Khatun")
    print("Contact: help@rskworld.in, +91 93305 39277")
    print("=" * 60)
    print(f"Environment: {os.getenv('FLASK_ENV', 'development')}")
    print(f"Debug Mode: {app.debug}")
    print(f"Host: {config_class.HOST}")
    print(f"Port: {config_class.PORT}")
    print(f"Supported Languages: {', '.join(config_class.SUPPORTED_LANGUAGES)}")
    print("=" * 60)
    
    # Check for required API keys
    if not config_class.OPENAI_API_KEY:
        print("āš ļø  WARNING: OpenAI API key not configured!")
        print("   Set OPENAI_API_KEY environment variable for AI responses.")
        print("   The bot will work with rule-based responses only.")
    
    if not config_class.GOOGLE_TRANSLATE_API_KEY:
        print("āš ļø  WARNING: Google Translate API key not configured!")
        print("   Set GOOGLE_TRANSLATE_API_KEY environment variable for better translations.")
        print("   Using free Google Translate service (may have limitations).")
    
    print("šŸš€ Starting Multi-language Chatbot...")
    print(f"šŸ“± Open your browser and visit: http://{config_class.HOST}:{config_class.PORT}")
    print("šŸŒ Supports multiple languages with automatic detection!")
    print("šŸ”„ Press Ctrl+C to stop the server")
    print("=" * 60)
    
    try:
        app.run(
            host=config_class.HOST,
            port=config_class.PORT,
            debug=config_class.DEBUG
        )
    except KeyboardInterrupt:
        print("\nšŸ‘‹ Shutting down Multi-language Chatbot...")
        print("Thank you for using RSK World's Multi-language Chatbot!")
        sys.exit(0)
    except Exception as e:
        print(f"āŒ Error starting server: {e}")
        sys.exit(1)

if __name__ == '__main__':
    main()
87 lines•2.9 KB
python
šŸš€ Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ā¤ļø

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer