Spaces:
Paused
Paused
Download scripts/upload_users.py from superxu520/Paper_Trading: direct link, hf CLI and curl.
- Browser
- Download file 439 Bytes
-
https://huggingface.co/spaces/superxu520/Paper_Trading/resolve/main/scripts/upload_users.py
- Command line
-
hf download hf://spaces/superxu520/Paper_Trading/scripts/upload_users.py
-
curl -L -o upload_users.py https://huggingface.co/spaces/superxu520/Paper_Trading/resolve/main/scripts/upload_users.py
439 Bytes
| import os | |
| import sys | |
| from pathlib import Path | |
| # 添加项目根目录到路径 | |
| project_root = Path(__file__).parent.parent | |
| sys.path.insert(0, str(project_root / "backend")) | |
| from dotenv import load_dotenv | |
| load_dotenv(project_root / ".env") | |
| from app.database_user import upload_user_db_to_hf | |
| if __name__ == "__main__": | |
| print("Starting user database upload to HF Dataset...") | |
| upload_user_db_to_hf() | |
| print("Upload completed!") | |