Celestis-RL / scripts /publish_interactive.py
PureOne's picture
Release Celestis-RL v2.0.0: audited research reference
f95cbd4 verified
Raw History Blame Contribute Delete
1.09 kB
"""Interactive public publication with paste-friendly token entry."""
import json
import os
from pathlib import Path
from celestis_rl.release import publish_release
def main():
root = Path(__file__).resolve().parents[1]
repo = input("New public Hugging Face repository (your-name/Celestis-RL): ").strip()
preview = publish_release(root, repo, public=True)
print(json.dumps(preview, indent=2))
if input("Type PUBLISH to upload all verified files publicly: ").strip() != "PUBLISH":
print("No upload performed.")
return
token = os.environ.get("HF_TOKEN")
if not token:
print("Paste your Hugging Face WRITE token below and press Enter.")
print("The token is visible so clipboard paste works reliably; it is not saved by this script.")
token = input("HF write token: ").strip()
if not token:
raise ValueError("Hugging Face write token cannot be empty")
result = publish_release(root, repo, publish=True, public=True, token=token)
print(json.dumps(result, indent=2))
if __name__ == "__main__":
main()