Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,7 +78,12 @@ def create_gradio_interface():
|
|
| 78 |
qr_text = gr.Textbox(label="Decoded Data") # Single box for decoded data
|
| 79 |
copy_button = gr.Button("Copy to Clipboard")
|
| 80 |
read_interface.render() # Corrected placement
|
| 81 |
-
copy_button.click(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
demo.launch(share=True)
|
| 84 |
|
|
|
|
| 78 |
qr_text = gr.Textbox(label="Decoded Data") # Single box for decoded data
|
| 79 |
copy_button = gr.Button("Copy to Clipboard")
|
| 80 |
read_interface.render() # Corrected placement
|
| 81 |
+
copy_button.click(
|
| 82 |
+
None,
|
| 83 |
+
qr_text,
|
| 84 |
+
qr_text,
|
| 85 |
+
js="() => {navigator.clipboard.writeText(document.querySelector('input[type=text]').value); return 'Copied to Clipboard!'}"
|
| 86 |
+
)
|
| 87 |
|
| 88 |
demo.launch(share=True)
|
| 89 |
|