Petite-LLM-3 / test_download.py
Tonic's picture
last trt to download the model at build time using the scripts
5a6251e
raw
history blame
1.1 kB
#!/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)