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
real-estate-bot
/
static
/
css
RSK World
real-estate-bot
Real Estate Bot - Python + Flask + OpenAI + SQLite + Property Search + AI Chatbot + Viewing Scheduler
css
  • style.css9.3 KB
run.py
run.py
Raw Download
Find: Go to:
#!/usr/bin/env python3
"""
Real Estate Bot - Application Entry Point
Author: RSK World (https://rskworld.in)
Founded by: Molla Samser
Designer & Tester: Rima Khatun
Contact: info@rskworld.com, +91 93305 39277
Year: 2026
Description: Real estate chatbot for property search, inquiries, and scheduling viewings
"""

import os
import sys
from pathlib import Path

# Add the project root to Python path for proper imports
project_root = Path(__file__).parent
sys.path.insert(0, str(project_root))

# Now import app which will use 'from src.xxx import...' correctly
from src.app import app

def main():
    """Main entry point for the application"""
    
    # Print startup banner
    print("=" * 60)
    print("šŸ  Real Estate Bot - AI-Powered Property Assistant")
    print("=" * 60)
    print("Author: RSK World (https://rskworld.in)")
    print("Founded by: Molla Samser")
    print("Designer & Tester: Rima Khatun")
    print("Contact: info@rskworld.com, +91 93305 39277")
    print("Year: 2026")
    print("=" * 60)
    
    # Check environment variables
    required_env_vars = ['OPENAI_API_KEY']
    missing_vars = []
    
    for var in required_env_vars:
        if not os.getenv(var):
            missing_vars.append(var)
    
    if missing_vars:
        print("āš ļø  Warning: Missing required environment variables:")
        for var in missing_vars:
            print(f"   - {var}")
        print("\nPlease set these variables in your .env file or environment.")
        print("The application will start but AI features may not work properly.")
        print("=" * 60)
    
    # Get configuration
    host = os.getenv('FLASK_HOST', '0.0.0.0')
    port = int(os.getenv('FLASK_PORT', 5000))
    debug = os.getenv('FLASK_DEBUG', 'True').lower() == 'true'
    
    print(f"šŸš€ Starting server on http://{host}:{port}")
    print(f"šŸ”§ Debug mode: {'ON' if debug else 'OFF'}")
    print(f"šŸ“ Working directory: {os.getcwd()}")
    print("=" * 60)
    print("🌐 Open your web browser and navigate to:")
    if host == '0.0.0.0':
        print(f"   - http://localhost:{port}")
        print(f"   - http://127.0.0.1:{port}")
    else:
        print(f"   - http://{host}:{port}")
    print("=" * 60)
    print("Press Ctrl+C to stop the server")
    print()
    
    try:
        # Start the Flask application
        app.run(
            host=host,
            port=port,
            debug=debug,
            use_reloader=debug
        )
    except KeyboardInterrupt:
        print("\nšŸ›‘ Server stopped by user")
    except Exception as e:
        print(f"\nāŒ Error starting server: {e}")
        sys.exit(1)

if __name__ == '__main__':
    main()
88 lines•2.7 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