Ali Mohsin commited on
Commit
6e90fc7
Β·
1 Parent(s): dbac4d6

new 10,000 fixes

Browse files
Files changed (1) hide show
  1. app.py +36 -35
app.py CHANGED
@@ -669,30 +669,45 @@ with gr.Blocks(fill_height=True, title="Dressify - Advanced Outfit Recommendatio
669
  gr.Markdown("## πŸ† Dressify – Advanced Outfit Recommendation System\n*Research-grade, self-contained outfit recommendation with comprehensive training controls*")
670
  gr.Markdown("πŸ’‘ **Pro Tip**: Start with 2000 samples for quick testing, then increase to 50000+ for production training!")
671
 
672
- # Global dataset size control
673
- with gr.Row():
674
- gr.Markdown("#### 🎯 **Global Dataset Size Control**")
675
- gr.Markdown("**Note**: Initial bootstrap downloads full dataset (required). Use 'Apply' button to limit splits for testing.")
676
-
677
- with gr.Row():
678
- gr.Markdown("#### πŸ“Š **Current Behavior**")
679
- gr.Markdown("β€’ **Bootstrap**: Downloads full dataset (53K outfits) + generates splits with **2000 samples by default**\nβ€’ **Training**: Uses 2000 samples (ultra-fast testing!)\nβ€’ **Apply Button**: Regenerates splits with your selected size limit")
 
 
680
 
681
- with gr.Row():
682
- global_dataset_size = gr.Dropdown(
683
- choices=["2000", "5000", "10000", "25000", "50000", "full"],
684
- value="2000",
685
- label="Global Dataset Size (Affects Prep + Training)"
686
- )
687
- gr.Markdown("**2000**: Ultra-fast testing (~1-2 min prep, ~2-5 min training)\n**5000**: Fast testing (~2-3 min prep, ~5-10 min training)\n**10000**: Good testing (~3-5 min prep, ~10-20 min training)\n**full**: Production (~5-10 min prep, ~1-4 hours training)")
688
 
689
- # Apply dataset size button
690
- apply_size_btn = gr.Button("πŸ”„ Apply Dataset Size & Regenerate Splits", variant="primary")
691
- size_status = gr.Textbox(label="Dataset Size Status", value="Dataset size: 2000 samples (click Apply to regenerate splits)", interactive=False)
 
 
 
 
 
692
 
693
- # Current dataset info
694
- gr.Markdown("#### πŸ“Š **Current Dataset Status**")
695
- gr.Markdown("β€’ **Full dataset downloaded**: 53,306 outfits (required for system)\nβ€’ **Splits generated**: **2000 samples by default** (fast testing!)\nβ€’ **Training will use**: 2000 samples (ultra-fast!)\nβ€’ **Scale up**: Use Apply button to increase to larger sizes")
 
 
 
 
 
 
 
 
 
 
 
 
 
696
 
697
  def apply_dataset_size(size: str):
698
  """Apply global dataset size and regenerate splits."""
@@ -739,20 +754,6 @@ with gr.Blocks(fill_height=True, title="Dressify - Advanced Outfit Recommendatio
739
  return f"❌ Failed to apply dataset size: {str(e)}"
740
 
741
  apply_size_btn.click(fn=apply_dataset_size, inputs=[global_dataset_size], outputs=[size_status])
742
-
743
- with gr.Tab("🎨 Recommend"):
744
- inp2 = gr.Files(label="Upload wardrobe images", file_types=["image"], file_count="multiple")
745
- with gr.Row():
746
- occasion = gr.Dropdown(choices=["casual", "business", "formal", "sport"], value="casual", label="Occasion")
747
- weather = gr.Dropdown(choices=["any", "hot", "mild", "cold", "rain"], value="any", label="Weather")
748
- num_outfits = gr.Slider(minimum=1, maximum=8, step=1, value=3, label="Number of outfits")
749
- out_gallery = gr.Gallery(label="Recommended Outfits", columns=1, height=320)
750
- out_json = gr.JSON(label="Outfit Details")
751
- btn2 = gr.Button("Generate Outfits", variant="primary")
752
- btn2.click(fn=gradio_recommend, inputs=[inp2, occasion, weather, num_outfits], outputs=[out_gallery, out_json])
753
-
754
- with gr.Tab("πŸ”¬ Advanced Training"):
755
- gr.Markdown("### 🎯 Comprehensive Training Parameter Control\nCustomize every aspect of model training for research and experimentation.")
756
 
757
  with gr.Row():
758
  with gr.Column(scale=1):
 
669
  gr.Markdown("## πŸ† Dressify – Advanced Outfit Recommendation System\n*Research-grade, self-contained outfit recommendation with comprehensive training controls*")
670
  gr.Markdown("πŸ’‘ **Pro Tip**: Start with 2000 samples for quick testing, then increase to 50000+ for production training!")
671
 
672
+ with gr.Tab("🎨 Recommend"):
673
+ inp2 = gr.Files(label="Upload wardrobe images", file_types=["image"], file_count="multiple")
674
+ with gr.Row():
675
+ occasion = gr.Dropdown(choices=["casual", "business", "formal", "sport"], value="casual", label="Occasion")
676
+ weather = gr.Dropdown(choices=["any", "hot", "mild", "cold", "rain"], value="any", label="Weather")
677
+ num_outfits = gr.Slider(minimum=1, maximum=8, step=1, value=3, label="Number of outfits")
678
+ out_gallery = gr.Gallery(label="Recommended Outfits", columns=1, height=320)
679
+ out_json = gr.JSON(label="Outfit Details")
680
+ btn2 = gr.Button("Generate Outfits", variant="primary")
681
+ btn2.click(fn=gradio_recommend, inputs=[inp2, occasion, weather, num_outfits], outputs=[out_gallery, out_json])
682
 
683
+ with gr.Tab("πŸ”¬ Advanced Training"):
684
+ gr.Markdown("### 🎯 Comprehensive Training Parameter Control\nCustomize every aspect of model training for research and experimentation.")
 
 
 
 
 
685
 
686
+ # Global Dataset Size Control
687
+ with gr.Row():
688
+ gr.Markdown("#### 🎯 **Global Dataset Size Control**")
689
+ gr.Markdown("**Note**: Initial bootstrap downloads full dataset (required). Use 'Apply' button to limit splits for testing.")
690
+
691
+ with gr.Row():
692
+ gr.Markdown("#### πŸ“Š **Current Behavior**")
693
+ gr.Markdown("β€’ **Bootstrap**: Downloads full dataset (53K outfits) + generates splits with **2000 samples by default**\nβ€’ **Training**: Uses 2000 samples (ultra-fast testing!)\nβ€’ **Apply Button**: Regenerates splits with your selected size limit")
694
 
695
+ with gr.Row():
696
+ global_dataset_size = gr.Dropdown(
697
+ choices=["2000", "5000", "10000", "25000", "50000", "full"],
698
+ value="2000",
699
+ label="Global Dataset Size (Affects Prep + Training)"
700
+ )
701
+ gr.Markdown("**2000**: Ultra-fast testing (~1-2 min prep, ~2-5 min training)\n**5000**: Fast testing (~2-3 min prep, ~5-10 min training)\n**10000**: Good testing (~3-5 min prep, ~10-20 min training)\n**full**: Production (~5-10 min prep, ~1-4 hours training)")
702
+
703
+ with gr.Row():
704
+ # Apply dataset size button
705
+ apply_size_btn = gr.Button("πŸ”„ Apply Dataset Size & Regenerate Splits", variant="primary")
706
+ size_status = gr.Textbox(label="Dataset Size Status", value="Dataset size: 2000 samples (click Apply to regenerate splits)", interactive=False)
707
+
708
+ # Current dataset info
709
+ gr.Markdown("#### πŸ“Š **Current Dataset Status**")
710
+ gr.Markdown("β€’ **Full dataset downloaded**: 53,306 outfits (required for system)\nβ€’ **Splits generated**: **2000 samples by default** (fast testing!)\nβ€’ **Training will use**: 2000 samples (ultra-fast!)\nβ€’ **Scale up**: Use Apply button to increase to larger sizes")
711
 
712
  def apply_dataset_size(size: str):
713
  """Apply global dataset size and regenerate splits."""
 
754
  return f"❌ Failed to apply dataset size: {str(e)}"
755
 
756
  apply_size_btn.click(fn=apply_dataset_size, inputs=[global_dataset_size], outputs=[size_status])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
757
 
758
  with gr.Row():
759
  with gr.Column(scale=1):