Spaces:
Running
Running
add copy button support
Browse files
app.py
CHANGED
@@ -310,26 +310,30 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
|
|
310 |
article_pageid = gr.Textbox(
|
311 |
label="Article Page ID",
|
312 |
placeholder="Page ID will appear here after extraction",
|
313 |
-
interactive=False
|
|
|
314 |
)
|
315 |
|
316 |
article_title = gr.Textbox(
|
317 |
label="Article Title",
|
318 |
placeholder="Title will appear here after extraction",
|
319 |
-
interactive=False
|
|
|
320 |
)
|
321 |
|
322 |
aticle_summary = gr.Textbox(
|
323 |
label="Article Summary",
|
324 |
placeholder="Summary will appear here after extraction",
|
325 |
-
interactive=False
|
|
|
326 |
)
|
327 |
|
328 |
article_xml = gr.Textbox(
|
329 |
label="Article XML",
|
330 |
placeholder="XML will appear here after extraction",
|
331 |
interactive=False,
|
332 |
-
visible=False # Hidden by default as it's usually large
|
|
|
333 |
)
|
334 |
|
335 |
# Debug info state and modal components
|
@@ -344,9 +348,9 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
|
|
344 |
section_components = []
|
345 |
for i in range(100): # Support up to 100 sections
|
346 |
with gr.Row():
|
347 |
-
section_textbox = gr.Textbox(visible=False, lines=4)
|
348 |
translate_btn = gr.Button("Translate", visible=False)
|
349 |
-
translation_output = gr.Textbox(visible=False, lines=4)
|
350 |
debug_btn = gr.Button("View Debug Info", visible=False)
|
351 |
section_components.extend([section_textbox, translate_btn, translation_output, debug_btn])
|
352 |
|
|
|
310 |
article_pageid = gr.Textbox(
|
311 |
label="Article Page ID",
|
312 |
placeholder="Page ID will appear here after extraction",
|
313 |
+
interactive=False,
|
314 |
+
show_copy_button=True
|
315 |
)
|
316 |
|
317 |
article_title = gr.Textbox(
|
318 |
label="Article Title",
|
319 |
placeholder="Title will appear here after extraction",
|
320 |
+
interactive=False,
|
321 |
+
show_copy_button=True
|
322 |
)
|
323 |
|
324 |
aticle_summary = gr.Textbox(
|
325 |
label="Article Summary",
|
326 |
placeholder="Summary will appear here after extraction",
|
327 |
+
interactive=False,
|
328 |
+
show_copy_button=True
|
329 |
)
|
330 |
|
331 |
article_xml = gr.Textbox(
|
332 |
label="Article XML",
|
333 |
placeholder="XML will appear here after extraction",
|
334 |
interactive=False,
|
335 |
+
visible=False, # Hidden by default as it's usually large
|
336 |
+
show_copy_button=True
|
337 |
)
|
338 |
|
339 |
# Debug info state and modal components
|
|
|
348 |
section_components = []
|
349 |
for i in range(100): # Support up to 100 sections
|
350 |
with gr.Row():
|
351 |
+
section_textbox = gr.Textbox(visible=False, lines=4, show_copy_button=True)
|
352 |
translate_btn = gr.Button("Translate", visible=False)
|
353 |
+
translation_output = gr.Textbox(visible=False, lines=4, show_copy_button=True)
|
354 |
debug_btn = gr.Button("View Debug Info", visible=False)
|
355 |
section_components.extend([section_textbox, translate_btn, translation_output, debug_btn])
|
356 |
|