Download scripts/restore_state.py from Leon4gr45/openweb: direct link, hf CLI and curl.
- Browser
- Download file 507 Bytes
-
https://huggingface.co/spaces/Leon4gr45/openweb/resolve/main/scripts/restore_state.py
- Command line
-
hf download hf://spaces/Leon4gr45/openweb/scripts/restore_state.py
-
curl -L -o restore_state.py https://huggingface.co/spaces/Leon4gr45/openweb/resolve/main/scripts/restore_state.py
507 Bytes
| """Restore from GitHub into a new isolated destination; never overwrites state.""" | |
| import argparse | |
| import json | |
| from pathlib import Path | |
| import sys | |
| sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) | |
| from vrag.backup.service import engine | |
| if __name__=='__main__': | |
| parser=argparse.ArgumentParser();parser.add_argument('--destination',type=Path,required=True);parser.add_argument('--checkpoint') | |
| args=parser.parse_args();print(json.dumps(engine().restore(args.destination,args.checkpoint))) | |