Spaces:
Runtime error
Runtime error
File size: 917 Bytes
4ade1ca |
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 31 32 33 |
#!/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() |