Spaces:
Sleeping
Sleeping
delete status on the leaderboard
Browse files
app.py
CHANGED
|
@@ -148,7 +148,7 @@ def install_requirements(file_path):
|
|
| 148 |
print(f"Error: {file_path} not found.")
|
| 149 |
except subprocess.CalledProcessError as e:
|
| 150 |
print(f"Installation failed: {e}")
|
| 151 |
-
HEADERS = ["Username", "Execution Time (s)", "Accuracy", "TP", "FP", "FN", "TN"
|
| 152 |
BASE = {'ottawa':(45.30326753851309,-75.93640391349997),
|
| 153 |
'ali_home':(37.88560412289598,-122.30218612514359),
|
| 154 |
'josh_home':(37.8697406, -122.30218612514359),
|
|
@@ -332,14 +332,14 @@ def evaluate_model(username, file):
|
|
| 332 |
accuracy = round((TP + TN) / (TP + TN + FP + FN), 2)
|
| 333 |
|
| 334 |
status = "Success" if accuracy > 0 else "Incorrect Model"
|
| 335 |
-
# ["Username", "Execution Time (s)", "Accuracy", "True Positive", "False Positive", "False Negative", "False Positive"
|
| 336 |
except Exception as e:
|
| 337 |
-
leaderboard_data = pd.concat([leaderboard_data, pd.DataFrame([[username, float("inf"), 0,-1,-1,-1,-1
|
| 338 |
columns=HEADERS)], ignore_index=True)
|
| 339 |
return leaderboard_data.values.tolist()
|
| 340 |
print("calculating new entry")
|
| 341 |
|
| 342 |
-
new_entry = pd.DataFrame([[username, execution_time, accuracy, TP, FP, FN, TN
|
| 343 |
columns=HEADERS)
|
| 344 |
print("updating new entry")
|
| 345 |
leaderboard_data = update_results_dataset(new_entry)
|
|
|
|
| 148 |
print(f"Error: {file_path} not found.")
|
| 149 |
except subprocess.CalledProcessError as e:
|
| 150 |
print(f"Installation failed: {e}")
|
| 151 |
+
HEADERS = ["Username", "Execution Time (s)", "Accuracy", "TP", "FP", "FN", "TN"]
|
| 152 |
BASE = {'ottawa':(45.30326753851309,-75.93640391349997),
|
| 153 |
'ali_home':(37.88560412289598,-122.30218612514359),
|
| 154 |
'josh_home':(37.8697406, -122.30218612514359),
|
|
|
|
| 332 |
accuracy = round((TP + TN) / (TP + TN + FP + FN), 2)
|
| 333 |
|
| 334 |
status = "Success" if accuracy > 0 else "Incorrect Model"
|
| 335 |
+
# ["Username", "Execution Time (s)", "Accuracy", "True Positive", "False Positive", "False Negative", "False Positive"]
|
| 336 |
except Exception as e:
|
| 337 |
+
leaderboard_data = pd.concat([leaderboard_data, pd.DataFrame([[username, float("inf"), 0,-1,-1,-1,-1]],
|
| 338 |
columns=HEADERS)], ignore_index=True)
|
| 339 |
return leaderboard_data.values.tolist()
|
| 340 |
print("calculating new entry")
|
| 341 |
|
| 342 |
+
new_entry = pd.DataFrame([[username, execution_time, accuracy, TP, FP, FN, TN]],
|
| 343 |
columns=HEADERS)
|
| 344 |
print("updating new entry")
|
| 345 |
leaderboard_data = update_results_dataset(new_entry)
|