Spaces:
Runtime error
Runtime error
| #!/usr/bin/env python3 | |
| """ | |
| Hugging Face Spaces wrapper for Firecrawl | |
| This file is required by HF Spaces - it just runs the bash setup script | |
| """ | |
| import os | |
| import subprocess | |
| import sys | |
| def main(): | |
| """Main entry point - just run the bash setup script""" | |
| print("π₯ Firecrawl on Hugging Face Spaces") | |
| print("===================================") | |
| # Change to the app directory | |
| os.chdir('/home/firecrawl/app') | |
| # Run the setup script directly | |
| try: | |
| subprocess.run(['./setup-firecrawl.sh'], check=True) | |
| except subprocess.CalledProcessError as e: | |
| print(f"β Setup script failed with exit code {e.returncode}") | |
| sys.exit(e.returncode) | |
| except KeyboardInterrupt: | |
| print("\nπ Interrupted by user") | |
| sys.exit(1) | |
| except Exception as e: | |
| print(f"β Unexpected error: {e}") | |
| sys.exit(1) | |
| if __name__ == "__main__": | |
| main() |