Liori25 commited on
Commit
79bc23a
·
verified ·
1 Parent(s): 8a00a7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -6
app.py CHANGED
@@ -171,6 +171,7 @@ body, .gradio-container { background-color: #f0f2f5; }
171
  border: 1px solid #ddd;
172
  padding: 20px;
173
  margin-bottom: 20px;
 
174
  }
175
 
176
  /* Similar Recipe Cards */
@@ -215,7 +216,7 @@ with gr.Blocks(title="Legacy Kitchen") as demo:
215
  <span class="app-slogan">Turning Handwritten Notes into a Digital Cookbook.</span>
216
  </div>
217
  </div>
218
- <div style="color: #65676b; font-weight: 600;">v3.2</div>
219
  </div>
220
  """)
221
 
@@ -243,14 +244,15 @@ with gr.Blocks(title="Legacy Kitchen") as demo:
243
 
244
  # SECTION 1: UPLOAD & TEXT
245
  with gr.Row(elem_classes=["gap-fix"]):
 
246
  # Left: Upload & Examples
247
  with gr.Column(scale=1):
248
- gr.Markdown("### 1. Upload Note", elem_classes=["content-card"])
249
  with gr.Group(elem_classes=["content-card"]):
250
  input_img = gr.Image(type="filepath", label="Upload", height=300)
251
  magic_btn = gr.Button("✨ Convert to Digital", variant="primary", size="lg")
252
 
253
- # NEW: Examples Component
254
  gr.Examples(
255
  examples=[
256
  ["quick_tries_images/applecrisp.jpg"],
@@ -259,15 +261,22 @@ with gr.Blocks(title="Legacy Kitchen") as demo:
259
  ],
260
  inputs=input_img,
261
  label="Or try these examples:",
262
- # cache_examples=False ensures fast startup and no build errors
263
  cache_examples=False
264
  )
265
 
266
  # Right: Text
267
  with gr.Column(scale=1):
268
- gr.Markdown("### 2. Digital Text", elem_classes=["content-card"])
269
  with gr.Group(elem_classes=["content-card"]):
270
- out_text = gr.Textbox(label="Result", lines=12, interactive=False, show_label=False)
 
 
 
 
 
 
 
 
271
 
272
  # Spacer
273
  gr.HTML("<div style='height: 35px;'></div>")
 
171
  border: 1px solid #ddd;
172
  padding: 20px;
173
  margin-bottom: 20px;
174
+ height: 100%; /* Important for equal height */
175
  }
176
 
177
  /* Similar Recipe Cards */
 
216
  <span class="app-slogan">Turning Handwritten Notes into a Digital Cookbook.</span>
217
  </div>
218
  </div>
219
+ <div style="color: #65676b; font-weight: 600;">v3.3</div>
220
  </div>
221
  """)
222
 
 
244
 
245
  # SECTION 1: UPLOAD & TEXT
246
  with gr.Row(elem_classes=["gap-fix"]):
247
+
248
  # Left: Upload & Examples
249
  with gr.Column(scale=1):
250
+ # FIX 1: Removed Header "1. Upload Note"
251
  with gr.Group(elem_classes=["content-card"]):
252
  input_img = gr.Image(type="filepath", label="Upload", height=300)
253
  magic_btn = gr.Button("✨ Convert to Digital", variant="primary", size="lg")
254
 
255
+ # Examples Component
256
  gr.Examples(
257
  examples=[
258
  ["quick_tries_images/applecrisp.jpg"],
 
261
  ],
262
  inputs=input_img,
263
  label="Or try these examples:",
 
264
  cache_examples=False
265
  )
266
 
267
  # Right: Text
268
  with gr.Column(scale=1):
269
+ # FIX 2: Removed Header "2. Digital Text"
270
  with gr.Group(elem_classes=["content-card"]):
271
+ # FIX 3: Added Empty State Placeholder
272
+ # FIX 4: Increased lines to 20 to align bottom with the left column examples
273
+ out_text = gr.Textbox(
274
+ label="Result",
275
+ value="Here your digitalized recipe will be presented",
276
+ lines=20,
277
+ interactive=False,
278
+ show_label=False
279
+ )
280
 
281
  # Spacer
282
  gr.HTML("<div style='height: 35px;'></div>")