Spaces:
Running
Running
Update app.py
Browse filesadding zip check
app.py
CHANGED
|
@@ -45,15 +45,18 @@ def get_model_size(model_info: ModelInfo):
|
|
| 45 |
def add_docker_eval(zip_file):
|
| 46 |
new_fid_list = zip_file.split("/")
|
| 47 |
new_fid = new_fid_list[-1]
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
|
| 59 |
def add_new_eval(
|
|
|
|
| 45 |
def add_docker_eval(zip_file):
|
| 46 |
new_fid_list = zip_file.split("/")
|
| 47 |
new_fid = new_fid_list[-1]
|
| 48 |
+
if new_fid.endswitth('.zip'):
|
| 49 |
+
API.upload_file(
|
| 50 |
+
path_or_fileobj=zip_file ,
|
| 51 |
+
repo_id="EnergyStarAI/tested_proprietary_models",
|
| 52 |
+
path_in_repo='submitted_models/'+new_fid,
|
| 53 |
+
repo_type="dataset",
|
| 54 |
+
commit_message="Adding logs via submission Space.",
|
| 55 |
+
token= TOKEN
|
| 56 |
+
)
|
| 57 |
+
gr.Info('Uploaded logs to dataset! We will validate their validity and add them to the next version of the leaderboard.')
|
| 58 |
+
else:
|
| 59 |
+
gr.Info('You can only upload .zip files here!')
|
| 60 |
|
| 61 |
|
| 62 |
def add_new_eval(
|