multimodalart HF staff commited on
Commit
15bf13a
1 Parent(s): 0e68d2d

Add duplicate space tag

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -248,11 +248,11 @@ def convert_to_ckpt():
248
  with gr.Blocks(css=css) as demo:
249
  with gr.Box():
250
  if "IS_SHARED_UI" in os.environ:
251
- gr.HTML('''
252
  <div class="gr-prose" style="max-width: 80%">
253
  <h2>Attention - This Space doesn't work in this shared UI</h2>
254
- <p>For it to work, you have to duplicate the Space and run it on your own profile using a (paid) private T4 GPU for training. As each T4 costs US$0.60/h, it should cost < US$1 to train a model with less than 100 images using default settings!</p>
255
- <p>Please, duplicate this Space, then go to the Settings tab and select a T4 instance.</p>
256
  <img class="instruction" src="file/duplicate.png">
257
  <img class="arrow" src="file/arrow.png" />
258
  </div>
 
248
  with gr.Blocks(css=css) as demo:
249
  with gr.Box():
250
  if "IS_SHARED_UI" in os.environ:
251
+ gr.HTML(f'''
252
  <div class="gr-prose" style="max-width: 80%">
253
  <h2>Attention - This Space doesn't work in this shared UI</h2>
254
+ <p>For it to work, you have to duplicate the Space and run it on your own profile using a (paid) private T4 GPU for training. As each T4 costs US$0.60/h, it should cost < US$1 to train a model with less than 100 images using default settings!</p>
255
+ <a style="display:inline-block" href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a>
256
  <img class="instruction" src="file/duplicate.png">
257
  <img class="arrow" src="file/arrow.png" />
258
  </div>