Spaces:
Running
Running
Commit
Β·
79f8f06
1
Parent(s):
66a6b28
update
Browse files
app.py
CHANGED
|
@@ -100,36 +100,36 @@ def compare_all(image_file, image_url, prompt):
|
|
| 100 |
gemini_img = run_gemini(raw_bytes, prompt)
|
| 101 |
yield og_pil, qwen_img, flux_img, gemini_img
|
| 102 |
|
| 103 |
-
with gr.Blocks(
|
| 104 |
-
gr.HTML("<h2 style='text-align: center;'>ποΈ Interior Design Model Arena</h2>")
|
| 105 |
|
| 106 |
with gr.Row():
|
| 107 |
with gr.Column(scale=3):
|
| 108 |
-
input_prompt = gr.Textbox(label="Edit Prompt", value=DEFAULT_PROMPT, lines=
|
| 109 |
with gr.Column(scale=2):
|
| 110 |
with gr.Row():
|
| 111 |
-
input_file = gr.Image(label="Upload", type="filepath", height=
|
| 112 |
-
input_url = gr.Textbox(label="URL", placeholder="
|
| 113 |
-
run_btn = gr.Button("π Generate
|
| 114 |
|
| 115 |
-
gr.HTML("<hr>")
|
| 116 |
|
| 117 |
with gr.Row():
|
| 118 |
with gr.Column():
|
| 119 |
-
gr.HTML("<div style='text-align: center'><b>ORIGINAL</b><br><small>
|
| 120 |
-
out_og = gr.Image(show_label=False, type="pil", height=
|
| 121 |
|
| 122 |
with gr.Column():
|
| 123 |
-
gr.HTML("<div style='text-align: center'><b>QWEN-EDIT</b><br><small>$0.004 - $0.008</small></div>")
|
| 124 |
-
out_qwen = gr.Image(show_label=False, type="pil", height=
|
| 125 |
|
| 126 |
with gr.Column():
|
| 127 |
-
gr.HTML("<div style='text-align: center'><b>FLUX-2 EDIT</b><br><small>$0.03</small></div>")
|
| 128 |
-
out_fal = gr.Image(show_label=False, type="pil", height=
|
| 129 |
|
| 130 |
with gr.Column():
|
| 131 |
-
gr.HTML("<div style='text-align: center'><b>GEMINI 2.5</b><br><small>$0.039</small></div>")
|
| 132 |
-
out_gemini = gr.Image(show_label=False, type="pil", height=
|
| 133 |
|
| 134 |
run_btn.click(
|
| 135 |
fn=compare_all,
|
|
@@ -138,4 +138,9 @@ with gr.Blocks(theme=gr.themes.Soft(), css=".gradio-container {max-width: 95% !i
|
|
| 138 |
)
|
| 139 |
|
| 140 |
if __name__ == "__main__":
|
| 141 |
-
demo.launch(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
gemini_img = run_gemini(raw_bytes, prompt)
|
| 101 |
yield og_pil, qwen_img, flux_img, gemini_img
|
| 102 |
|
| 103 |
+
with gr.Blocks() as demo:
|
| 104 |
+
gr.HTML("<h2 style='text-align: center; margin-bottom: 20px;'>ποΈ Interior Design Model Arena</h2>")
|
| 105 |
|
| 106 |
with gr.Row():
|
| 107 |
with gr.Column(scale=3):
|
| 108 |
+
input_prompt = gr.Textbox(label="Edit Prompt", value=DEFAULT_PROMPT, lines=4)
|
| 109 |
with gr.Column(scale=2):
|
| 110 |
with gr.Row():
|
| 111 |
+
input_file = gr.Image(label="Upload Source", type="filepath", height=120)
|
| 112 |
+
input_url = gr.Textbox(label="OR: Image URL", placeholder="Paste URL here...")
|
| 113 |
+
run_btn = gr.Button("π Generate Side-by-Side", variant="primary")
|
| 114 |
|
| 115 |
+
gr.HTML("<hr style='margin: 20px 0;'>")
|
| 116 |
|
| 117 |
with gr.Row():
|
| 118 |
with gr.Column():
|
| 119 |
+
gr.HTML("<div style='text-align: center; margin-bottom: 10px;'><b>ORIGINAL</b><br><small>Input Reference</small></div>")
|
| 120 |
+
out_og = gr.Image(show_label=False, type="pil", height=380, object_fit="contain")
|
| 121 |
|
| 122 |
with gr.Column():
|
| 123 |
+
gr.HTML("<div style='text-align: center; margin-bottom: 10px;'><b>QWEN-EDIT</b><br><small>$0.004 - $0.008</small></div>")
|
| 124 |
+
out_qwen = gr.Image(show_label=False, type="pil", height=380, object_fit="contain")
|
| 125 |
|
| 126 |
with gr.Column():
|
| 127 |
+
gr.HTML("<div style='text-align: center; margin-bottom: 10px;'><b>FLUX-2 EDIT</b><br><small>$0.03</small></div>")
|
| 128 |
+
out_fal = gr.Image(show_label=False, type="pil", height=380, object_fit="contain")
|
| 129 |
|
| 130 |
with gr.Column():
|
| 131 |
+
gr.HTML("<div style='text-align: center; margin-bottom: 10px;'><b>GEMINI 2.5</b><br><small>$0.039</small></div>")
|
| 132 |
+
out_gemini = gr.Image(show_label=False, type="pil", height=380, object_fit="contain")
|
| 133 |
|
| 134 |
run_btn.click(
|
| 135 |
fn=compare_all,
|
|
|
|
| 138 |
)
|
| 139 |
|
| 140 |
if __name__ == "__main__":
|
| 141 |
+
demo.launch(
|
| 142 |
+
server_name="0.0.0.0",
|
| 143 |
+
server_port=7860,
|
| 144 |
+
theme=gr.themes.Soft(),
|
| 145 |
+
css=".gradio-container {max-width: 98% !important}"
|
| 146 |
+
)
|