Spaces:
Running
Running
Update app.py
Browse filesI want it to get the new dataset version
app.py
CHANGED
|
@@ -17,9 +17,7 @@ COMPUTE_SPACE = f"{OWNER}/launch-computation-example"
|
|
| 17 |
TOKEN = os.environ.get("DEBUG")
|
| 18 |
API = HfApi(token=TOKEN)
|
| 19 |
|
| 20 |
-
|
| 21 |
-
requests_dset = requests.to_pandas()
|
| 22 |
-
model_list= requests_dset[requests_dset['status'] == 'COMPLETED']
|
| 23 |
|
| 24 |
tasks = ['ASR', 'Object Detection', 'Text Classification', 'Image Captioning', 'Question Answering', 'Text Generation', 'Image Classification',
|
| 25 |
'Sentence Similarity', 'Image Generation', 'Summarization']
|
|
@@ -52,6 +50,9 @@ def add_new_eval(
|
|
| 52 |
model_name = repo_id.split("/")[1]
|
| 53 |
|
| 54 |
current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
|
|
|
|
|
|
|
|
|
| 55 |
if repo_id in model_list['model'].tolist():
|
| 56 |
return 'This model has already been run!'
|
| 57 |
else:
|
|
@@ -59,7 +60,6 @@ def add_new_eval(
|
|
| 59 |
try:
|
| 60 |
model_info = API.model_info(repo_id=repo_id)
|
| 61 |
except Exception:
|
| 62 |
-
|
| 63 |
return "Could not find information for model %s" % (model)
|
| 64 |
|
| 65 |
model_size = get_model_size(model_info=model_info)
|
|
@@ -91,7 +91,11 @@ def add_new_eval(
|
|
| 91 |
return start_compute_space()
|
| 92 |
|
| 93 |
def print_existing_models():
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
with gr.Blocks() as demo:
|
| 97 |
gr.Markdown("# Energy Star Submission Portal - v.0 (2024) π π» π")
|
|
|
|
| 17 |
TOKEN = os.environ.get("DEBUG")
|
| 18 |
API = HfApi(token=TOKEN)
|
| 19 |
|
| 20 |
+
|
|
|
|
|
|
|
| 21 |
|
| 22 |
tasks = ['ASR', 'Object Detection', 'Text Classification', 'Image Captioning', 'Question Answering', 'Text Generation', 'Image Classification',
|
| 23 |
'Sentence Similarity', 'Image Generation', 'Summarization']
|
|
|
|
| 50 |
model_name = repo_id.split("/")[1]
|
| 51 |
|
| 52 |
current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
| 53 |
+
requests= load_dataset("EnergyStarAI/requests_debug", split="test", token=TOKEN)
|
| 54 |
+
requests_dset = requests.to_pandas()
|
| 55 |
+
model_list= requests_dset[requests_dset['status'] == 'COMPLETED']
|
| 56 |
if repo_id in model_list['model'].tolist():
|
| 57 |
return 'This model has already been run!'
|
| 58 |
else:
|
|
|
|
| 60 |
try:
|
| 61 |
model_info = API.model_info(repo_id=repo_id)
|
| 62 |
except Exception:
|
|
|
|
| 63 |
return "Could not find information for model %s" % (model)
|
| 64 |
|
| 65 |
model_size = get_model_size(model_info=model_info)
|
|
|
|
| 91 |
return start_compute_space()
|
| 92 |
|
| 93 |
def print_existing_models():
|
| 94 |
+
requests= load_dataset("EnergyStarAI/requests_debug", split="test", token=TOKEN)
|
| 95 |
+
requests_dset = requests.to_pandas()
|
| 96 |
+
model_list= requests_dset[requests_dset['status'] == 'COMPLETED']
|
| 97 |
+
return model_list
|
| 98 |
+
|
| 99 |
|
| 100 |
with gr.Blocks() as demo:
|
| 101 |
gr.Markdown("# Energy Star Submission Portal - v.0 (2024) π π» π")
|