Nightfury16 commited on
Commit
79f8f06
Β·
1 Parent(s): 66a6b28
Files changed (1) hide show
  1. app.py +21 -16
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(theme=gr.themes.Soft(), css=".gradio-container {max-width: 95% !important}") as demo:
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=3)
109
  with gr.Column(scale=2):
110
  with gr.Row():
111
- input_file = gr.Image(label="Upload", type="filepath", height=100)
112
- input_url = gr.Textbox(label="URL", placeholder="Optional...")
113
- run_btn = gr.Button("πŸš€ Generate Comparison", variant="primary")
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>Source Reference</small></div>")
120
- out_og = gr.Image(show_label=False, type="pil", height=350, object_fit="contain")
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=350, object_fit="contain")
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=350, object_fit="contain")
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=350, object_fit="contain")
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(server_name="0.0.0.0", server_port=7860)
 
 
 
 
 
 
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
+ )