Spaces:
Running
on
Zero
Running
on
Zero
Remove test_download.py
Browse files- test_download.py +0 -46
test_download.py
DELETED
|
@@ -1,46 +0,0 @@
|
|
| 1 |
-
#!/usr/bin/env python3
|
| 2 |
-
"""
|
| 3 |
-
Simple test script to verify download functionality for Hugging Face Spaces
|
| 4 |
-
"""
|
| 5 |
-
|
| 6 |
-
import os
|
| 7 |
-
import sys
|
| 8 |
-
import logging
|
| 9 |
-
|
| 10 |
-
# Configure logging
|
| 11 |
-
logging.basicConfig(level=logging.INFO)
|
| 12 |
-
logger = logging.getLogger(__name__)
|
| 13 |
-
|
| 14 |
-
def test_download():
|
| 15 |
-
"""Test the download functionality"""
|
| 16 |
-
try:
|
| 17 |
-
logger.info("Testing download functionality...")
|
| 18 |
-
|
| 19 |
-
# Import and run the download script
|
| 20 |
-
from download_model import main as download_main
|
| 21 |
-
|
| 22 |
-
success = download_main()
|
| 23 |
-
logger.info(f"Download test result: {'PASS' if success else 'FAIL'}")
|
| 24 |
-
|
| 25 |
-
return success
|
| 26 |
-
|
| 27 |
-
except Exception as e:
|
| 28 |
-
logger.error(f"Error testing download: {e}")
|
| 29 |
-
return False
|
| 30 |
-
|
| 31 |
-
def main():
|
| 32 |
-
"""Main test function"""
|
| 33 |
-
logger.info("Starting download test...")
|
| 34 |
-
|
| 35 |
-
success = test_download()
|
| 36 |
-
|
| 37 |
-
if success:
|
| 38 |
-
logger.info("β
Download test passed!")
|
| 39 |
-
else:
|
| 40 |
-
logger.error("β Download test failed!")
|
| 41 |
-
|
| 42 |
-
return success
|
| 43 |
-
|
| 44 |
-
if __name__ == "__main__":
|
| 45 |
-
success = main()
|
| 46 |
-
sys.exit(0 if success else 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|