Spaces:
Running
on
Zero
Running
on
Zero
| #!/usr/bin/env python3 | |
| """ | |
| Simple test script to verify download functionality for Hugging Face Spaces | |
| """ | |
| import os | |
| import sys | |
| import logging | |
| # Configure logging | |
| logging.basicConfig(level=logging.INFO) | |
| logger = logging.getLogger(__name__) | |
| def test_download(): | |
| """Test the download functionality""" | |
| try: | |
| logger.info("Testing download functionality...") | |
| # Import and run the download script | |
| from download_model import main as download_main | |
| success = download_main() | |
| logger.info(f"Download test result: {'PASS' if success else 'FAIL'}") | |
| return success | |
| except Exception as e: | |
| logger.error(f"Error testing download: {e}") | |
| return False | |
| def main(): | |
| """Main test function""" | |
| logger.info("Starting download test...") | |
| success = test_download() | |
| if success: | |
| logger.info("β Download test passed!") | |
| else: | |
| logger.error("β Download test failed!") | |
| return success | |
| if __name__ == "__main__": | |
| success = main() | |
| sys.exit(0 if success else 1) |