Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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>
|
| 70 |
-
with gr.Tab(label="
|
| 71 |
with gr.Row():
|
| 72 |
with gr.Column():
|
| 73 |
-
input_img = gr.Image(label="Input Image",
|
| 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 |
|