Spaces:
Running
Running
Özeti panoya kopyalama butonu eklendi
Browse files
ui.py
CHANGED
@@ -55,6 +55,8 @@ with gr.Blocks() as demo:
|
|
55 |
|
56 |
with gr.Row():
|
57 |
text_output = gr.Textbox(label="Giriş Metni")
|
|
|
|
|
58 |
summary_output = gr.Textbox(label="AI Özeti")
|
59 |
summary_file = gr.File(label="Özeti İndir", interactive=True)
|
60 |
|
@@ -63,6 +65,13 @@ with gr.Blocks() as demo:
|
|
63 |
inputs=[pdf_input, image_input, manual_text, mode_selector, model_selector],
|
64 |
outputs=[text_output, summary_output, summary_file]
|
65 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
if __name__ == "__main__":
|
68 |
demo.launch(share=True)
|
|
|
55 |
|
56 |
with gr.Row():
|
57 |
text_output = gr.Textbox(label="Giriş Metni")
|
58 |
+
copy_btn = gr.Button("Özeti Kopyala")
|
59 |
+
copy_status = gr.Textbox(visible=False)
|
60 |
summary_output = gr.Textbox(label="AI Özeti")
|
61 |
summary_file = gr.File(label="Özeti İndir", interactive=True)
|
62 |
|
|
|
65 |
inputs=[pdf_input, image_input, manual_text, mode_selector, model_selector],
|
66 |
outputs=[text_output, summary_output, summary_file]
|
67 |
)
|
68 |
+
copy_btn.click(
|
69 |
+
fn=lambda summary: (summary, "✔️ Özet panoya kopyalandı."),
|
70 |
+
inputs=[summary_output],
|
71 |
+
outputs=[summary_output, copy_status],
|
72 |
+
js="navigator.clipboard.writeText(arguments[0]);"
|
73 |
+
)
|
74 |
+
|
75 |
|
76 |
if __name__ == "__main__":
|
77 |
demo.launch(share=True)
|