LetsTryGPT/agent4-implementation
0
1#!/usr/bin/env python32"""3Minimal Python wrapper for Agent4 Node.js application4This ensures the Space starts successfully5"""6 7import subprocess8import sys9import os10 11def main():12 print("๐ Starting Agent4 Implementation...")13 print(f"Node version: {subprocess.check_output(['node', '--version']).decode().strip()}")14 print(f"NPM version: {subprocess.check_output(['npm', '--version']).decode().strip()}")15 16 # Check if dist exists17 if not os.path.exists('/app/dist/index.js'):18 print("โ dist/index.js not found - running build...")19 subprocess.run(['npm', 'run', 'build'], check=True)20 21 print("โ
Starting Node.js application...")22 # Start the Node.js app23 subprocess.run(['node', 'dist/index.js'], check=True)24 25if __name__ == "__main__":26 main()27 