File size: 789 Bytes
bf8b26e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python3
"""
Hugging Face Spaces entry point for AstraChat
The actual application runs via Dockerfile, but HF Spaces requires this file.
"""

import os
import subprocess
import sys

def main():
    """This script is required by HF Spaces but our app runs via Dockerfile"""
    try:
        print("AstraChat is running via Docker on port 7860")
        print("Access your app at the Spaces URL")

        # The actual app runs via the Dockerfile CMD
        # This is just a placeholder for HF Spaces requirements
        import time
        while True:
            time.sleep(1)

    except KeyboardInterrupt:
        print("Shutting down...")
    except Exception as e:
        print(f"Error: {e}", file=sys.stderr)
        sys.exit(1)

if __name__ == "__main__":
    main()