Spaces:
Sleeping
Sleeping
File size: 633 Bytes
93891ee |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# This Gradio app opens a link in a new tab and hides the original link.
import gradio as gr
# Function to open the link in a new tab
def open_link():
return gr.HTML('<a href="https://ai.studio/apps/drive/1YfAr51E86q0vi4AObxaFLV97GuqvfyRj" target="_blank">Click here to open the link</a>')
# Create a Gradio interface that displays a button to open the link
with gr.Blocks() as demo:
link_button = gr.Button("Open Link")
link_output = gr.HTML()
# When the button is clicked, the open_link function is called
link_button.click(open_link, outputs=link_output)
# Launch the interface
demo.launch(show_error=True) |