mroccuper commited on
Commit
0fc1ac7
Β·
verified Β·
1 Parent(s): abca33d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -108,6 +108,7 @@ def build_interface():
108
  gr.Markdown("Generate optimized design prompts from images using Google's Gemini.")
109
 
110
  with gr.Row():
 
111
  with gr.Column(scale=1):
112
  api_key = gr.Textbox(
113
  label="πŸ”‘ Gemini API Key",
@@ -123,6 +124,16 @@ def build_interface():
123
  interactive=True
124
  )
125
 
 
 
 
 
 
 
 
 
 
 
126
  style = gr.Dropdown(
127
  list(STYLE_INSTRUCTIONS.keys()),
128
  value="General",
@@ -138,14 +149,6 @@ def build_interface():
138
 
139
  gen_btn = gr.Button("✨ Generate Prompt", variant="primary")
140
 
141
- with gr.Column(scale=2):
142
- status_msg = gr.Textbox(label="πŸ“’ Status", interactive=False)
143
- prompt_output = gr.Textbox(
144
- label="πŸ“ Optimized Prompt",
145
- lines=10,
146
- interactive=True
147
- )
148
-
149
  # Event Handling
150
  gen_btn.click(
151
  fn=generate_prompt,
 
108
  gr.Markdown("Generate optimized design prompts from images using Google's Gemini.")
109
 
110
  with gr.Row():
111
+ # Left Panel: Image Upload & API Key
112
  with gr.Column(scale=1):
113
  api_key = gr.Textbox(
114
  label="πŸ”‘ Gemini API Key",
 
124
  interactive=True
125
  )
126
 
127
+ # Right Panel: Prompt Output + Controls Below
128
+ with gr.Column(scale=2):
129
+ status_msg = gr.Textbox(label="πŸ“’ Status", interactive=False)
130
+ prompt_output = gr.Textbox(
131
+ label="πŸ“ Optimized Prompt",
132
+ lines=8,
133
+ interactive=True
134
+ )
135
+
136
+ # Controls under prompt box
137
  style = gr.Dropdown(
138
  list(STYLE_INSTRUCTIONS.keys()),
139
  value="General",
 
149
 
150
  gen_btn = gr.Button("✨ Generate Prompt", variant="primary")
151
 
 
 
 
 
 
 
 
 
152
  # Event Handling
153
  gen_btn.click(
154
  fn=generate_prompt,