Rishi Desai commited on
Commit
0aa8547
·
1 Parent(s): 7b3611f

cleaning demo up

Browse files
Files changed (1) hide show
  1. demo.py +3 -8
demo.py CHANGED
@@ -508,7 +508,8 @@ def create_prompt_optimization_ui():
508
  label="Upload caption files",
509
  file_types=[".txt"],
510
  type="filepath",
511
- elem_classes="file-upload-container"
 
512
  )
513
 
514
  manual_captions = gr.Textbox(
@@ -524,6 +525,7 @@ def create_prompt_optimization_ui():
524
  with gr.Column(scale=1) as right_column:
525
  # Right side for prompt input and output
526
  gr.Markdown("### Optimize Prompt")
 
527
 
528
  user_prompt = gr.Textbox(
529
  label="Enter your prompt",
@@ -651,13 +653,6 @@ def build_ui():
651
  optimized_prompt, optimization_status
652
  ) = create_prompt_optimization_ui()
653
 
654
- # Create info markdown directly at the bottom of the tab
655
- gr.Markdown("""
656
- **About Prompt Optimization:**
657
- - This feature helps you craft prompts that match the style of your training captions
658
- - Enter a simple prompt and the system will optimize it to match your training style
659
- """, elem_classes=["category-info"])
660
-
661
  # Set up prompt optimization event handlers
662
  setup_prompt_optimization_handlers(
663
  captions_upload, manual_captions, use_generated_captions,
 
508
  label="Upload caption files",
509
  file_types=[".txt"],
510
  type="filepath",
511
+ elem_classes="file-upload-container",
512
+ height=220
513
  )
514
 
515
  manual_captions = gr.Textbox(
 
525
  with gr.Column(scale=1) as right_column:
526
  # Right side for prompt input and output
527
  gr.Markdown("### Optimize Prompt")
528
+ gr.Markdown("\n- Craft prompts that match the style of your training captions\n- Enter a simple prompt and receive an optimized version\n", elem_classes=["category-info"])
529
 
530
  user_prompt = gr.Textbox(
531
  label="Enter your prompt",
 
653
  optimized_prompt, optimization_status
654
  ) = create_prompt_optimization_ui()
655
 
 
 
 
 
 
 
 
656
  # Set up prompt optimization event handlers
657
  setup_prompt_optimization_handlers(
658
  captions_upload, manual_captions, use_generated_captions,