remove upload temp media files
Browse files7005 unmodified lines700670077008700970107011701270137014701570167017701828 unmodified lines704770487049705070517052705370547055705670577005 unmodified linesimport tempfileimport os# Upload temporary media files to HF and replace URLs (only for Static HTML, not Transformers.js)if sdk == "static" and language == "html":print("[Deploy] Uploading temporary media files to HF and updating URLs for multi-file static HTML app")# Update the index.html file with permanent media URLsif 'index.html' in files:files['index.html'] = upload_temp_files_to_hf_and_replace_urls(files['index.html'], token)try:with tempfile.TemporaryDirectory() as tmpdir:# Write each file preserving subdirectories if any28 unmodified linesprint("[Deploy] Converting ComfyUI JSON to prettified HTML display")code = prettify_comfyui_json_for_html(code)# Upload temporary media files to HF and replace URLs (only for Static HTML, not Transformers.js)if sdk == "static" and language == "html":print("[Deploy] Uploading temporary media files to HF and updating URLs for single-file static HTML app")code = upload_temp_files_to_hf_and_replace_urls(code, token)max_attempts = 3for attempt in range(max_attempts):import tempfile7005 unmodified lines70067007700870097010701128 unmodified lines7040704170427043704470457005 unmodified linesimport tempfileimport ostry:with tempfile.TemporaryDirectory() as tmpdir:# Write each file preserving subdirectories if any28 unmodified linesprint("[Deploy] Converting ComfyUI JSON to prettified HTML display")code = prettify_comfyui_json_for_html(code)max_attempts = 3for attempt in range(max_attempts):import tempfile
app.py-12