Tech-Meld commited on
Commit
3b8df03
1 Parent(s): 9188207

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -4,7 +4,6 @@ import spaces
4
  import torch
5
  import re
6
 
7
- # Load the model and processor
8
  model = PaliGemmaForConditionalGeneration.from_pretrained("gokaygokay/sd3-long-captioner").to("cpu").eval()
9
  processor = PaliGemmaProcessor.from_pretrained("gokaygokay/sd3-long-captioner")
10
 
@@ -66,11 +65,11 @@ css = """
66
  """
67
 
68
  with gr.Blocks(css=css) as demo:
69
- gr.HTML("<h1><center>Image caption using finetuned PaliGemma on SD3 generation data.<center><h1>")
70
- with gr.Tab(label="Img2Prompt for SD3"):
71
  with gr.Row():
72
  with gr.Column():
73
- input_img = gr.Image(label="Input Image", tool="select", type="pil", interactive=True)
74
  submit_btn = gr.Button(value="Start")
75
  output = gr.Textbox(label="Prompt", lines=10, interactive=True)
76
 
 
4
  import torch
5
  import re
6
 
 
7
  model = PaliGemmaForConditionalGeneration.from_pretrained("gokaygokay/sd3-long-captioner").to("cpu").eval()
8
  processor = PaliGemmaProcessor.from_pretrained("gokaygokay/sd3-long-captioner")
9
 
 
65
  """
66
 
67
  with gr.Blocks(css=css) as demo:
68
+ gr.HTML("<h1><center>Finetuned PaliGemma for SD3 prompt generation.<center><h1>")
69
+ with gr.Tab(label="Image to Prompt for SD3"):
70
  with gr.Row():
71
  with gr.Column():
72
+ input_img = gr.Image(label="Input Image", type="pil", interactive=True, multiple=True)
73
  submit_btn = gr.Button(value="Start")
74
  output = gr.Textbox(label="Prompt", lines=10, interactive=True)
75