Spaces:
Sleeping
Sleeping
| #!/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() |