Avijit Ghosh
commited on
Commit
·
f999525
1
Parent(s):
f0e2fd8
remove robots info
Browse files
app.py
CHANGED
|
@@ -445,16 +445,16 @@ with gr.Blocks(title="HuggingFace Model Explorer") as demo:
|
|
| 445 |
f"- Data as of: {data_as_of_date_display}\n"
|
| 446 |
f"- Size categories:\n{size_dist}")
|
| 447 |
|
| 448 |
-
# --- MODIFICATION: Add 'has_robot' count to UI data_info_text ---
|
| 449 |
-
if not current_df.empty and 'has_robot' in current_df.columns:
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
elif not current_df.empty:
|
| 456 |
-
|
| 457 |
-
# --- END MODIFICATION ---
|
| 458 |
|
| 459 |
status_msg_ui = "Data loaded successfully. Ready to generate plot."
|
| 460 |
else:
|
|
|
|
| 445 |
f"- Data as of: {data_as_of_date_display}\n"
|
| 446 |
f"- Size categories:\n{size_dist}")
|
| 447 |
|
| 448 |
+
# # --- MODIFICATION: Add 'has_robot' count to UI data_info_text ---
|
| 449 |
+
# if not current_df.empty and 'has_robot' in current_df.columns:
|
| 450 |
+
# robot_true_count = current_df['has_robot'].sum()
|
| 451 |
+
# data_info_text += f"\n- **Models flagged 'has_robot'**: {robot_true_count}"
|
| 452 |
+
# if 0 < robot_true_count <= 10: # If a few are found, list some IDs
|
| 453 |
+
# sample_robot_ids = current_df[current_df['has_robot']]['id'].head(5).tolist()
|
| 454 |
+
# data_info_text += f"\n - Sample 'has_robot' model IDs: `{', '.join(sample_robot_ids)}`"
|
| 455 |
+
# elif not current_df.empty:
|
| 456 |
+
# data_info_text += "\n- **Models flagged 'has_robot'**: 'has_robot' column not found in loaded data."
|
| 457 |
+
# # --- END MODIFICATION ---
|
| 458 |
|
| 459 |
status_msg_ui = "Data loaded successfully. Ready to generate plot."
|
| 460 |
else:
|