throaway2854 commited on
Commit
4b22b57
Β·
verified Β·
1 Parent(s): efa182c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -45
app.py CHANGED
@@ -529,54 +529,54 @@ with gr.Blocks(title=TITLE) as demo:
529
  label="Details / Debug Info",
530
  )
531
 
532
- # ---------------- TAB 2: TAG CONTROL ----------------
533
- with gr.Tab("Tag Control"):
534
- gr.Markdown("### Tag Substitutes")
535
- gr.Markdown(
536
- "Add rows where **Original Tag** will be replaced by **Substitute Tag** "
537
- "in the final combined output (after all frames are processed)."
538
- )
539
 
540
- with gr.Row():
541
- tag_substitutes_df = gr.Dataframe(
542
- headers=["Original Tag", "Substitute Tag"],
543
- datatype=["str", "str"],
544
- row_count=1, # just start with 1 empty row
545
- column_count=2,
546
- type="array",
547
- label="Tag Substitutes",
548
- interactive=True,
549
- )
550
- add_sub_row_btn = gr.Button("βž• Add substitute", scale=0)
551
 
552
- gr.Markdown("### Tag Exclusions")
553
- gr.Markdown(
554
- "Add tags that should be **removed entirely** from the final combined output."
555
- )
556
 
557
- with gr.Row():
558
- tag_exclusions_df = gr.Dataframe(
559
- headers=["Tag to Exclude"],
560
- datatype=["str"],
561
- row_count=1, # start with 1 row
562
- column_count=1,
563
- type="array",
564
- label="Tag Exclusions",
565
- interactive=True,
566
- )
567
- add_ex_row_btn = gr.Button("βž• Add exclusion", scale=0)
568
-
569
- add_sub_row_btn.click(
570
- fn=add_substitute_row,
571
- inputs=tag_substitutes_df,
572
- outputs=tag_substitutes_df,
573
- )
574
-
575
- add_ex_row_btn.click(
576
- fn=add_exclusion_row,
577
- inputs=tag_exclusions_df,
578
- outputs=tag_exclusions_df,
579
- )
580
 
581
 
582
  # Wiring the button AFTER all components are defined
 
529
  label="Details / Debug Info",
530
  )
531
 
532
+ # ---------------- TAB 2: TAG CONTROL ----------------
533
+ with gr.Tab("Tag Control"):
534
+ gr.Markdown("### Tag Substitutes")
535
+ gr.Markdown(
536
+ "Add rows where **Original Tag** will be replaced by **Substitute Tag** "
537
+ "in the final combined output (after all frames are processed)."
538
+ )
539
 
540
+ with gr.Row():
541
+ tag_substitutes_df = gr.Dataframe(
542
+ headers=["Original Tag", "Substitute Tag"],
543
+ datatype=["str", "str"],
544
+ row_count=1,
545
+ column_count=2,
546
+ type="array",
547
+ label="Tag Substitutes",
548
+ interactive=True,
549
+ )
550
+ add_sub_row_btn = gr.Button("βž• Add substitute", scale=0)
551
 
552
+ gr.Markdown("### Tag Exclusions")
553
+ gr.Markdown(
554
+ "Add tags that should be **removed entirely** from the final combined output."
555
+ )
556
 
557
+ with gr.Row():
558
+ tag_exclusions_df = gr.Dataframe(
559
+ headers=["Tag to Exclude"],
560
+ datatype=["str"],
561
+ row_count=1,
562
+ column_count=1,
563
+ type="array",
564
+ label="Tag Exclusions",
565
+ interactive=True,
566
+ )
567
+ add_ex_row_btn = gr.Button("βž• Add exclusion", scale=0)
568
+
569
+ add_sub_row_btn.click(
570
+ fn=add_substitute_row,
571
+ inputs=tag_substitutes_df,
572
+ outputs=tag_substitutes_df,
573
+ )
574
+
575
+ add_ex_row_btn.click(
576
+ fn=add_exclusion_row,
577
+ inputs=tag_exclusions_df,
578
+ outputs=tag_exclusions_df,
579
+ )
580
 
581
 
582
  # Wiring the button AFTER all components are defined