Spaces:
Sleeping
Sleeping
Commit
·
a43989d
1
Parent(s):
ffed1a8
updating repo name
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import json
|
|
| 4 |
import os
|
| 5 |
import uuid
|
| 6 |
from datetime import datetime
|
| 7 |
-
|
| 8 |
import pandas as pd
|
| 9 |
import pytz
|
| 10 |
import requests
|
|
@@ -20,12 +20,14 @@ OUTCOMES_JSON = 'match_outcomes.json'
|
|
| 20 |
PLAYERS_JSON = 'players.json'
|
| 21 |
image_path = 'ipl_image.png'
|
| 22 |
|
|
|
|
|
|
|
| 23 |
|
| 24 |
# Initialize CommitScheduler
|
| 25 |
scheduler = CommitScheduler(
|
| 26 |
-
repo_id="
|
| 27 |
repo_type="dataset",
|
| 28 |
-
folder_path=
|
| 29 |
path_in_repo="predictions", # Path in dataset repo where predictions will be saved
|
| 30 |
every=2, # Push every 240 minutes (4 hours)
|
| 31 |
)
|
|
|
|
| 4 |
import os
|
| 5 |
import uuid
|
| 6 |
from datetime import datetime
|
| 7 |
+
from pathlib import Path
|
| 8 |
import pandas as pd
|
| 9 |
import pytz
|
| 10 |
import requests
|
|
|
|
| 20 |
PLAYERS_JSON = 'players.json'
|
| 21 |
image_path = 'ipl_image.png'
|
| 22 |
|
| 23 |
+
PREDICTIONS_FOLDER = Path("ipl_predictions")
|
| 24 |
+
PREDICTIONS_FOLDER.mkdir(parents=True, exist_ok=True)
|
| 25 |
|
| 26 |
# Initialize CommitScheduler
|
| 27 |
scheduler = CommitScheduler(
|
| 28 |
+
repo_id="DIS_IPL_Dataset",
|
| 29 |
repo_type="dataset",
|
| 30 |
+
folder_path=PREDICTIONS_FOLDER, # Local folder where predictions are saved temporarily
|
| 31 |
path_in_repo="predictions", # Path in dataset repo where predictions will be saved
|
| 32 |
every=2, # Push every 240 minutes (4 hours)
|
| 33 |
)
|