hysts HF staff commited on
Commit
6bec03c
1 Parent(s): 811ffbe

Add DuplicateButton

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -1,5 +1,6 @@
1
  #!/usr/bin/env python
2
 
 
3
  import random
4
 
5
  import gradio as gr
@@ -129,6 +130,12 @@ def run(
129
 
130
  with gr.Blocks() as demo:
131
  gr.Markdown(DESCRIPTION)
 
 
 
 
 
 
132
  with gr.Row():
133
  with gr.Column():
134
  with gr.Group():
 
1
  #!/usr/bin/env python
2
 
3
+ import os
4
  import random
5
 
6
  import gradio as gr
 
130
 
131
  with gr.Blocks() as demo:
132
  gr.Markdown(DESCRIPTION)
133
+ gr.DuplicateButton(
134
+ value="Duplicate Space for private use",
135
+ elem_id="duplicate-button",
136
+ visible=os.getenv("SHOW_DUPLICATE_BUTTON") == "1",
137
+ )
138
+
139
  with gr.Row():
140
  with gr.Column():
141
  with gr.Group():