Basic usage
Constructor
Button label text
Button style variant. Defaults to Hugging Face branded style
Button size
Duplicate a Hugging Face Space
import gradio as gr
with gr.Blocks() as demo:
gr.DuplicateButton()
demo.launch()
import gradio as gr
with gr.Blocks() as demo:
gr.Markdown("# My Awesome Model")
gr.Markdown("Try it out below!")
# Add duplicate button for users to create their own copy
with gr.Row():
gr.DuplicateButton("Duplicate this Space")
# Your interface here
input = gr.Textbox()
output = gr.Textbox()
demo.launch()