Asmit Nayak commited on
Commit
cc71657
·
1 Parent(s): b49a99a

Enable dataset updates by uncommenting relevant functions

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1125,8 +1125,8 @@ def create_interface():
1125
  print(f"[CONSOLE] Warning: Image path not found or invalid: {dataset_image_path}")
1126
  image_df = pd.DataFrame([{"id": save_url, "image": None, "annotated_image": None}])
1127
 
1128
- # dataset_upload.update_dataset_with_new_splits(save_dict)
1129
- # dataset_upload.update_dataset_with_new_images(image_df, scheduler=scheduler, dataset_dir=dataset_dir, jsonl_path=jsonl_path)
1130
 
1131
  # Prepare CSV for download
1132
  csv_file_path = save_results_to_csv(final_result, url)
@@ -1220,6 +1220,8 @@ if __name__ == "__main__":
1220
  print(f"[CONSOLE] Failed to decrypt system prompts, exiting...")
1221
  exit(1)
1222
 
 
 
1223
  print(f"[CONSOLE] ===== STARTING GRADIO APPLICATION =====")
1224
  print(f"[CONSOLE] Creating Gradio interface...")
1225
  demo = create_interface()
 
1125
  print(f"[CONSOLE] Warning: Image path not found or invalid: {dataset_image_path}")
1126
  image_df = pd.DataFrame([{"id": save_url, "image": None, "annotated_image": None}])
1127
 
1128
+ dataset_upload.update_dataset_with_new_splits(save_dict)
1129
+ dataset_upload.update_dataset_with_new_images(image_df, scheduler=scheduler, dataset_dir=dataset_dir, jsonl_path=jsonl_path)
1130
 
1131
  # Prepare CSV for download
1132
  csv_file_path = save_results_to_csv(final_result, url)
 
1220
  print(f"[CONSOLE] Failed to decrypt system prompts, exiting...")
1221
  exit(1)
1222
 
1223
+ # Set debug mode, when debug mode is on then we specify a specific split to get the table from and
1224
+
1225
  print(f"[CONSOLE] ===== STARTING GRADIO APPLICATION =====")
1226
  print(f"[CONSOLE] Creating Gradio interface...")
1227
  demo = create_interface()