gokaygokay commited on
Commit
f77e7f8
1 Parent(s): ccaf7bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -397,6 +397,8 @@ def create_interface():
397
  seed = gr.Number(label="Seed", value=0)
398
  custom = gr.Textbox(label="Custom")
399
  subject = gr.Textbox(label="Subject")
 
 
400
  artform = gr.Dropdown(["disabled"] + ARTFORM, label="Artform", value="disabled")
401
  photo_type = gr.Dropdown(["disabled"] + PHOTO_TYPE, label="Photo Type", value="disabled")
402
 
@@ -421,15 +423,17 @@ def create_interface():
421
  photographer = gr.Dropdown(["disabled"] + PHOTOGRAPHER, label="Photographer", value="disabled")
422
  artist = gr.Dropdown(["disabled"] + ARTIST, label="Artist", value="disabled")
423
  digital_artform = gr.Dropdown(["disabled"] + DIGITAL_ARTFORM, label="Digital Artform", value="disabled")
 
 
424
 
425
  with gr.Column(scale=2):
426
- with gr.Accordion("Image and Caption", open=True):
427
  input_image = gr.Image(label="Input Image (optional)")
428
  caption_output = gr.Textbox(label="Generated Caption", lines=3)
429
  create_caption_button = gr.Button("Create Caption")
430
 
431
  with gr.Accordion("Prompt Generation", open=True):
432
- generate_button = gr.Button("Generate Prompt")
433
  output = gr.Textbox(label="Generated Prompt / Input Text", lines=5)
434
  add_caption_button = gr.Button("Add Caption to Prompt")
435
  t5xxl_output = gr.Textbox(label="T5XXL Output", visible=True)
@@ -437,15 +441,15 @@ def create_interface():
437
  clip_g_output = gr.Textbox(label="CLIP G Output", visible=True)
438
 
439
  with gr.Column(scale=2):
440
- with gr.Accordion("Text Generation", open=True):
441
  model = gr.Dropdown(["Mixtral", "Mistral", "Llama 3", "Mistral-Nemo"], label="Model", value="Mixtral")
442
  happy_talk = gr.Checkbox(label="Happy Talk", value=True)
443
  compress = gr.Checkbox(label="Compress", value=False)
444
  compression_level = gr.Radio(["soft", "medium", "hard"], label="Compression Level", value="medium")
445
  poster = gr.Checkbox(label="Poster", value=False)
446
  custom_base_prompt = gr.Textbox(label="Custom Base Prompt", lines=5)
447
- generate_text_button = gr.Button("Generate Text")
448
- text_output = gr.Textbox(label="Generated Text", lines=10)
449
 
450
  def create_caption(image):
451
  if image is not None:
 
397
  seed = gr.Number(label="Seed", value=0)
398
  custom = gr.Textbox(label="Custom")
399
  subject = gr.Textbox(label="Subject")
400
+
401
+ with gr.Accordion("Artform and Photo Type", open=False):
402
  artform = gr.Dropdown(["disabled"] + ARTFORM, label="Artform", value="disabled")
403
  photo_type = gr.Dropdown(["disabled"] + PHOTO_TYPE, label="Photo Type", value="disabled")
404
 
 
423
  photographer = gr.Dropdown(["disabled"] + PHOTOGRAPHER, label="Photographer", value="disabled")
424
  artist = gr.Dropdown(["disabled"] + ARTIST, label="Artist", value="disabled")
425
  digital_artform = gr.Dropdown(["disabled"] + DIGITAL_ARTFORM, label="Digital Artform", value="disabled")
426
+
427
+ generate_button = gr.Button("Generate Prompt")
428
 
429
  with gr.Column(scale=2):
430
+ with gr.Accordion("Image and Caption", open=False):
431
  input_image = gr.Image(label="Input Image (optional)")
432
  caption_output = gr.Textbox(label="Generated Caption", lines=3)
433
  create_caption_button = gr.Button("Create Caption")
434
 
435
  with gr.Accordion("Prompt Generation", open=True):
436
+
437
  output = gr.Textbox(label="Generated Prompt / Input Text", lines=5)
438
  add_caption_button = gr.Button("Add Caption to Prompt")
439
  t5xxl_output = gr.Textbox(label="T5XXL Output", visible=True)
 
441
  clip_g_output = gr.Textbox(label="CLIP G Output", visible=True)
442
 
443
  with gr.Column(scale=2):
444
+ with gr.Accordion("Prompt Generation with LLM", open=False):
445
  model = gr.Dropdown(["Mixtral", "Mistral", "Llama 3", "Mistral-Nemo"], label="Model", value="Mixtral")
446
  happy_talk = gr.Checkbox(label="Happy Talk", value=True)
447
  compress = gr.Checkbox(label="Compress", value=False)
448
  compression_level = gr.Radio(["soft", "medium", "hard"], label="Compression Level", value="medium")
449
  poster = gr.Checkbox(label="Poster", value=False)
450
  custom_base_prompt = gr.Textbox(label="Custom Base Prompt", lines=5)
451
+ generate_text_button = gr.Button("Generate Text")
452
+ text_output = gr.Textbox(label="Generated Text", lines=10)
453
 
454
  def create_caption(image):
455
  if image is not None: