multimodalart HF staff commited on
Commit
25f1c2b
β€’
1 Parent(s): 23f4617

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -5,6 +5,7 @@ from share_btn import community_icon_html, loading_icon_html, share_js
5
 
6
  model_id="haoheliu/AudioLDM-S-Full"
7
 
 
8
  audioldm = build_model()
9
  # audioldm=None
10
 
@@ -182,6 +183,14 @@ css = """
182
  iface = gr.Blocks(css=css)
183
 
184
  with iface:
 
 
 
 
 
 
 
 
185
  gr.HTML(
186
  """
187
  <div style="text-align: center; max-width: 700px; margin: 0 auto;">
 
5
 
6
  model_id="haoheliu/AudioLDM-S-Full"
7
 
8
+
9
  audioldm = build_model()
10
  # audioldm=None
11
 
 
183
  iface = gr.Blocks(css=css)
184
 
185
  with iface:
186
+ if(is_shared_ui):
187
+ with gr.Box():
188
+ top_description = gr.HTML(f'''
189
+ <div class="gr-prose" style="max-width: 80%">
190
+ <h2 style="margin-top: 0">Attention - This Space doesn't work in this shared UI</h2>
191
+ <p>For it to work, you can access the <a href="https://huggingface.co/spaces/haoheliu/audioldm-text-to-audio-generation">original</a> or duplicate this Space and run it on your own profile using a GPU.&nbsp;&nbsp;<a class="duplicate-button" style="display:inline-block" target="_blank" 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></p>
192
+ </div>
193
+ ''')
194
  gr.HTML(
195
  """
196
  <div style="text-align: center; max-width: 700px; margin: 0 auto;">