fix
Browse files1195 unmodified lines11961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201195 unmodified linesprint(f"[Duplicate] Duplicating {from_space_id} to {to_space_id}")# Prepare duplicate_space parametersduplicate_params = {"from_id": from_space_id,"to_id": to_space_name, # Just the name, not full ID"token": token,"private": private,"exist_ok": True}# Always use the same hardware as the original space if it has oneif original_hardware:duplicate_params["hardware"] = original_hardwareprint(f"[Duplicate] Using same hardware as original: {original_hardware}")if original_storage:duplicate_params["storage"] = original_storageprint(f"[Duplicate] Using same storage as original: {original_storage}")# Duplicate the spaceprint(f"[Duplicate] Duplicating with params: {list(duplicate_params.keys())}")duplicated_repo = duplicate_space(**duplicate_params)# Extract space URL1195 unmodified lines11961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201195 unmodified linesprint(f"[Duplicate] Duplicating {from_space_id} to {to_space_id}")# Prepare duplicate_space parameters# Per docs: "The new Space will be created in your account and will be in the same# state as the original Space (running or paused)"# Don't specify hardware/storage - let HuggingFace duplicate automaticallyduplicate_params = {"from_id": from_space_id,"to_id": to_space_name, # Just the name, not full ID"token": token,"exist_ok": True# Note: Not setting private, hardware, storage, secrets, variables# to ensure TRUE duplication (HF copies everything automatically)}# Only set private if explicitly requestedif private:duplicate_params["private"] = private# Duplicate the space (HuggingFace automatically copies all settings)print(f"[Duplicate] Duplicating {from_space_id} to {username}/{to_space_name}")print(f"[Duplicate] Letting HuggingFace handle hardware/storage/secrets automatically")duplicated_repo = duplicate_space(**duplicate_params)# Extract space URL
backend_deploy.py+11-11