deankk commited on
Commit
815bf02
·
verified ·
1 Parent(s): 8df6ea0

Update app.py

Browse files

❌ Versi lama (error):
with gr.Row():
box = gr.Textbox(...)
copy_btn = gr.CopyButton(value=box) ← GA ADA DI GRADIO INI

✅ Versi sekarang (aman):
with gr.Group(visible=(i < 3)) as group:
box = gr.Textbox(...) ← cukup ini saja

Files changed (1) hide show
  1. app.py +8 -11
app.py CHANGED
@@ -363,23 +363,20 @@ with gr.Blocks() as demo:
363
  gr.Markdown("### 📋 Hasil Caption")
364
  gr.Markdown(
365
  '<span style="font-size:12px;color:#999;">'
366
- 'Klik tombol 📋 untuk copy tiap caption</span>'
367
  )
368
 
369
  caption_boxes = []
370
  caption_groups = []
371
  for i in range(5):
372
  with gr.Group(visible=(i < 3)) as group:
373
- with gr.Row():
374
- box = gr.Textbox(
375
- label=f"Caption {i + 1}",
376
- lines=4,
377
- max_lines=8,
378
- interactive=False,
379
- elem_classes=["caption-output"],
380
- scale=5,
381
- )
382
- copy_btn = gr.CopyButton(value=box, scale=1)
383
  caption_boxes.append(box)
384
  caption_groups.append(group)
385
 
 
363
  gr.Markdown("### 📋 Hasil Caption")
364
  gr.Markdown(
365
  '<span style="font-size:12px;color:#999;">'
366
+ 'Blok teks caption lalu Ctrl+C / Cmd+C untuk copy</span>'
367
  )
368
 
369
  caption_boxes = []
370
  caption_groups = []
371
  for i in range(5):
372
  with gr.Group(visible=(i < 3)) as group:
373
+ box = gr.Textbox(
374
+ label=f"Caption {i + 1}",
375
+ lines=4,
376
+ max_lines=8,
377
+ interactive=False,
378
+ elem_classes=["caption-output"],
379
+ )
 
 
 
380
  caption_boxes.append(box)
381
  caption_groups.append(group)
382