Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -177,7 +177,7 @@ def detect_with_model(image: Image.Image, prompt: str, username: str, model_name
|
|
| 177 |
|
| 178 |
csv_path = os.path.join("test", "leaderboard_entries.csv")
|
| 179 |
header = "file_name,prompt,label,model,split,prediction,user,timestamp\n"
|
| 180 |
-
csv_line = f"test/{type_image}/{image_filename},\"{prompt}\",{type_image},{model_name},test,{prediction.lower()},{username},{datetime.now().isoformat()}\n"
|
| 181 |
try:
|
| 182 |
file_exists = os.path.exists(csv_path)
|
| 183 |
with open(csv_path, "a", encoding="utf-8") as f:
|
|
|
|
| 177 |
|
| 178 |
csv_path = os.path.join("test", "leaderboard_entries.csv")
|
| 179 |
header = "file_name,prompt,label,model,split,prediction,user,timestamp\n"
|
| 180 |
+
csv_line = f"test/{type_image}/{image_filename},\"{prompt}\",{type_image},{model_name.lower()},test,{prediction.lower()},{username},{datetime.now().isoformat()}\n"
|
| 181 |
try:
|
| 182 |
file_exists = os.path.exists(csv_path)
|
| 183 |
with open(csv_path, "a", encoding="utf-8") as f:
|