Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -195,8 +195,8 @@ def detect_with_model(image: Image.Image, prompt: str, username: str, model_name
|
|
| 195 |
image.save(image_path)
|
| 196 |
|
| 197 |
csv_path = os.path.join("test", "leaderboard_entries.csv")
|
| 198 |
-
|
| 199 |
-
|
| 200 |
try:
|
| 201 |
file_exists = os.path.exists(csv_path)
|
| 202 |
with open(csv_path, "a", encoding="utf-8") as f:
|
|
|
|
| 195 |
image.save(image_path)
|
| 196 |
|
| 197 |
csv_path = os.path.join("test", "leaderboard_entries.csv")
|
| 198 |
+
leaderboard_entries.loc[len(df)] = [f"test/{type_image}/{image_filename}", prompt, type_image, model_name.lower(), "test", prediction.lower(), username, datetime.now().isoformat()]
|
| 199 |
+
leaderboard_entries.to_csv(csv_path, index=False)
|
| 200 |
try:
|
| 201 |
file_exists = os.path.exists(csv_path)
|
| 202 |
with open(csv_path, "a", encoding="utf-8") as f:
|