Anisha Bhatnagar commited on
Commit
c70a836
Β·
1 Parent(s): f4d3b67

removed more unused code

Browse files
Files changed (1) hide show
  1. app.py +1 -20
app.py CHANGED
@@ -392,11 +392,6 @@ def app(share=False):#, use_cluster_feats=False):
392
  llm_style_feats_analysis = gr.State()
393
  visible_zoomed_authors = gr.State()
394
 
395
- # if use_cluster_feats:
396
- # # ── Dynamic Cluster Choice dropdown ──────────────────────────────────
397
- # gr.HTML(instruction_callout("Choose a cluster from the dropdown below to inspect whether its features appear in the mystery author’s text."))
398
- # cluster_dropdown.visible = True
399
- # else:
400
  gr.HTML(instruction_callout("Zoom in on the plot to select a set of background authors and see the presence of the top features from this set in candidate and mystery authors."))
401
 
402
  with gr.Row():
@@ -446,17 +441,6 @@ def app(share=False):#, use_cluster_feats=False):
446
  inputs=[task_dropdown, model_radio, custom_model, task_authors_embeddings_df, background_authors_embeddings_df, predicted_author, ground_truth_author],
447
  outputs=[plot, style_map_state, bg_proj_state, bg_lbls_state, bg_authors_df]
448
  )
449
-
450
- # Populate feature list based on selection.
451
- # if use_cluster_feats:
452
- # # Use cluster-based flow
453
- # cluster_dropdown.change(
454
- # fn=on_cluster_change,
455
- # inputs=[cluster_dropdown, style_map_state],
456
- # outputs=[features_rb, gram2vec_rb , feature_list_state]
457
- # #adding feature_list_state to persisit all llm features in the app state
458
- # )
459
- # else:
460
 
461
  axis_ranges.change(
462
  fn=handle_zoom_with_retries,
@@ -542,7 +526,4 @@ def app(share=False):#, use_cluster_feats=False):
542
  demo.launch(share=share)
543
 
544
  if __name__ == "__main__":
545
- parser = argparse.ArgumentParser()
546
- # parser.add_argument("--use_cluster_feats", action="store_true", help="Use cluster-based selection for features")
547
- args = parser.parse_args()
548
- app(share=True)#, use_cluster_feats=args.use_cluster_feats)
 
392
  llm_style_feats_analysis = gr.State()
393
  visible_zoomed_authors = gr.State()
394
 
 
 
 
 
 
395
  gr.HTML(instruction_callout("Zoom in on the plot to select a set of background authors and see the presence of the top features from this set in candidate and mystery authors."))
396
 
397
  with gr.Row():
 
441
  inputs=[task_dropdown, model_radio, custom_model, task_authors_embeddings_df, background_authors_embeddings_df, predicted_author, ground_truth_author],
442
  outputs=[plot, style_map_state, bg_proj_state, bg_lbls_state, bg_authors_df]
443
  )
 
 
 
 
 
 
 
 
 
 
 
444
 
445
  axis_ranges.change(
446
  fn=handle_zoom_with_retries,
 
526
  demo.launch(share=share)
527
 
528
  if __name__ == "__main__":
529
+ app(share=True)