remove upload temp media files
Browse files7005 unmodified lines700670077008700970107011701270137014701570097010701128 unmodified lines704070417042705070517052705370547043704470457005 unmodified lines import tempfile import 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 URLs if '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 lines print("[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 = 3 for attempt in range(max_attempts): import tempfileapp.py-12