Data2Model / run.py
Nausad's picture
Upload 25 files
facf506 verified
Raw History Blame Contribute Delete
908 Bytes
#!/usr/bin/env python3
"""
Data2Model Run Script
Easy way to start the application
"""
import os
import sys
def main():
print("=" * 60)
print(" 🚀 Starting Data2Model Server")
print("=" * 60)
print()
print("Server will start at: http://localhost:5000")
print("Press Ctrl+C to stop the server")
print()
print("=" * 60)
print()
# Set environment variables
os.environ['FLASK_APP'] = 'app.py'
os.environ['FLASK_ENV'] = 'development'
# Import and run the app
try:
from app import app
app.run(debug=True, host='0.0.0.0', port=5000)
except ImportError:
print("❌ Error: Could not import app.py")
print(" Make sure you're in the Data2Model directory")
sys.exit(1)
except KeyboardInterrupt:
print("\n\n✅ Server stopped")
sys.exit(0)
if __name__ == "__main__":
main()