Team Ai
Apppublic

LetsTryGPT/agent4-implementation

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes
app.py27 linesDownload Raw Back to root
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