Spaces:
Running
Running
Upload huggingface_upload_api_scarper.py with huggingface_hub
Browse files
huggingface_upload_api_scarper.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import polars as pl
|
| 2 |
+
import datetime
|
| 3 |
+
import io
|
| 4 |
+
import time
|
| 5 |
+
import sys
|
| 6 |
+
|
| 7 |
+
from huggingface_hub import HfApi
|
| 8 |
+
# Convert DataFrame to Parquet in-memory
|
| 9 |
+
|
| 10 |
+
list_spaces = [
|
| 11 |
+
"TJStatsApps/spring_statcast_leaderboard",
|
| 12 |
+
"TJStatsApps/spring_training_pitching_app",
|
| 13 |
+
"TJStatsApps/pitching_summary_compare",
|
| 14 |
+
"TJStatsApps/pitching_summary_complete",
|
| 15 |
+
"TJStatsApps/pitch_plot_select_spring",
|
| 16 |
+
"TJStatsApps/test_daily",
|
| 17 |
+
"TJStatsApps/pitching_summary_daily",
|
| 18 |
+
"TJStatsApps/pitch_plot_select",
|
| 19 |
+
"TJStatsApps/pitching_heat_maps",
|
| 20 |
+
]
|
| 21 |
+
|
| 22 |
+
api = HfApi()
|
| 23 |
+
for space in list_spaces:
|
| 24 |
+
api.upload_file(
|
| 25 |
+
path_or_fileobj="huggingface_upload_api_scarper.py",
|
| 26 |
+
path_in_repo="huggingface_upload_api_scarper.py",
|
| 27 |
+
repo_id=space,
|
| 28 |
+
repo_type="space",
|
| 29 |
+
)
|