> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/gradio-app/gradio/llms.txt
> Use this file to discover all available pages before exploring further.

# DuplicateButton

> Duplicate a Hugging Face Space

The DuplicateButton creates a button that duplicates the current Space on Hugging Face. Does nothing when running locally.

## Basic usage

```python theme={null}
import gradio as gr

with gr.Blocks() as demo:
    gr.DuplicateButton()
    
demo.launch()
```

## Constructor

<ParamField path="value" type="str" default="'Duplicate Space'">
  Button label text
</ParamField>

<ParamField path="variant" type="Literal['primary', 'secondary', 'stop', 'huggingface']" default="'huggingface'">
  Button style variant. Defaults to Hugging Face branded style
</ParamField>

<ParamField path="size" type="Literal['sm', 'md', 'lg']" default="'sm'">
  Button size
</ParamField>

## Example

```python theme={null}
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()
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.