Spaces:
Sleeping
Sleeping
transformers js deploy fix
Browse files595 unmodified lines596597598599600601602595 unmodified lines# Create a NEW temp file for this upload (key difference from old approach)with tempfile.NamedTemporaryFile("w", suffix=f".{file_name.split('.')[-1]}", delete=False, encoding='utf-8') as f:f.write(file_content)temp_file_path = f.name# Upload the file without commit_message (HF handles this for spaces)api.upload_file(595 unmodified lines596597598599600601602603604595 unmodified lines# Create a NEW temp file for this upload (key difference from old approach)with tempfile.NamedTemporaryFile("w", suffix=f".{file_name.split('.')[-1]}", delete=False, encoding='utf-8') as f:f.write(file_content)f.flush() # Ensure all content is written to disk before closingtemp_file_path = f.name# File is now closed and flushed, safe to upload# Upload the file without commit_message (HF handles this for spaces)api.upload_file(
backend_deploy.py+2