Update app.py
Browse files
app.py
CHANGED
|
@@ -44,22 +44,7 @@ async def get_results():
|
|
| 44 |
processed_data = []
|
| 45 |
grouped = data.groupby('model_id')
|
| 46 |
|
| 47 |
-
|
| 48 |
-
model_data = {
|
| 49 |
-
'model_id': model_id,
|
| 50 |
-
'scores': {}
|
| 51 |
-
}
|
| 52 |
-
|
| 53 |
-
# Calculate scores for each source
|
| 54 |
-
for source in group['source'].unique():
|
| 55 |
-
source_data = group[group['source'] == source]
|
| 56 |
-
avg_acc = source_data['acc'].mean()
|
| 57 |
-
model_data['scores'][source] = float(avg_acc)
|
| 58 |
-
model_data['scores']["Average"] = group["acc"].mean()
|
| 59 |
-
|
| 60 |
-
processed_data.append(model_data)
|
| 61 |
-
|
| 62 |
-
return processed_data
|
| 63 |
|
| 64 |
except Exception as e:
|
| 65 |
# Print the full error traceback to your logs
|
|
|
|
| 44 |
processed_data = []
|
| 45 |
grouped = data.groupby('model_id')
|
| 46 |
|
| 47 |
+
return data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
except Exception as e:
|
| 50 |
# Print the full error traceback to your logs
|