Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -794,16 +794,18 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
|
|
794 |
(copy_summary_button, "summary_output")
|
795 |
]:
|
796 |
btn.click(
|
797 |
-
fn=
|
798 |
-
|
799 |
-
outputs=progress_status
|
|
|
800 |
)
|
801 |
|
802 |
# ChatGPT handler
|
803 |
open_chatgpt_button.click(
|
804 |
-
fn=
|
805 |
-
|
806 |
-
outputs=progress_status
|
|
|
807 |
)
|
808 |
|
809 |
# Model processing
|
|
|
794 |
(copy_summary_button, "summary_output")
|
795 |
]:
|
796 |
btn.click(
|
797 |
+
fn=lambda _: f"const text = document.querySelector('#{elem_id} textarea').value; navigator.clipboard.writeText(text); return 'Copied to clipboard!';",
|
798 |
+
inputs=None,
|
799 |
+
outputs=progress_status,
|
800 |
+
js=True
|
801 |
)
|
802 |
|
803 |
# ChatGPT handler
|
804 |
open_chatgpt_button.click(
|
805 |
+
fn=lambda: "window.open('https://chat.openai.com/', '_blank'); return 'Opened ChatGPT in new tab';",
|
806 |
+
inputs=None,
|
807 |
+
outputs=progress_status,
|
808 |
+
js=True
|
809 |
)
|
810 |
|
811 |
# Model processing
|