haoheliu commited on
Commit
f45148f
1 Parent(s): 8f019f2

remove share button

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -30,7 +30,7 @@ def text2audio(text, duration, guidance_scale, random_seed, n_candidates):
30
  # waveform = [(16000, np.random.randn(16000)), (16000, np.random.randn(16000))]
31
  if(len(waveform) == 1):
32
  waveform = waveform[0]
33
- return waveform,gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
34
 
35
  # iface = gr.Interface(fn=text2audio, inputs=[
36
  # gr.Textbox(value="A man is speaking in a huge room", max_lines=1),
@@ -202,17 +202,18 @@ with iface:
202
  ############# Output
203
  # outputs=gr.Audio(label="Output", type="numpy")
204
  outputs=gr.Video(label="Output")
205
- with gr.Group(elem_id="container-advanced-btns"):
206
- # advanced_button = gr.Button("Advanced options", elem_id="advanced-btn")
207
- with gr.Group(elem_id="share-btn-container"):
208
- community_icon = gr.HTML(community_icon_html, visible=False)
209
- loading_icon = gr.HTML(loading_icon_html, visible=False)
210
- share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
 
211
  # outputs=[gr.Audio(label="Output", type="numpy"), gr.Audio(label="Output", type="numpy")]
212
 
213
  btn = gr.Button("Submit").style(full_width=True)
214
- btn.click(text2audio, inputs=[textbox, duration, guidance_scale, seed, n_candidates], outputs=[outputs, community_icon, loading_icon, share_button]) # , share_button, community_icon, loading_icon
215
- share_button.click(None, [], [], _js=share_js)
216
  gr.HTML('''
217
  <hr>
218
  <div class="footer" style="text-align: center; max-width: 700px; margin: 0 auto;">
@@ -231,6 +232,6 @@ with iface:
231
  )
232
  # <p>This demo is strictly for research demo purpose only. For commercial use please <a href="haoheliu@gmail.com">contact us</a>.</p>
233
 
234
- iface.queue(concurrency_count = 2)
235
  iface.launch(debug=True)
236
  # iface.launch(debug=True, share=True)
 
30
  # waveform = [(16000, np.random.randn(16000)), (16000, np.random.randn(16000))]
31
  if(len(waveform) == 1):
32
  waveform = waveform[0]
33
+ return waveform # ,gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
34
 
35
  # iface = gr.Interface(fn=text2audio, inputs=[
36
  # gr.Textbox(value="A man is speaking in a huge room", max_lines=1),
 
202
  ############# Output
203
  # outputs=gr.Audio(label="Output", type="numpy")
204
  outputs=gr.Video(label="Output")
205
+
206
+ # with gr.Group(elem_id="container-advanced-btns"):
207
+ # # advanced_button = gr.Button("Advanced options", elem_id="advanced-btn")
208
+ # with gr.Group(elem_id="share-btn-container"):
209
+ # community_icon = gr.HTML(community_icon_html, visible=False)
210
+ # loading_icon = gr.HTML(loading_icon_html, visible=False)
211
+ # share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
212
  # outputs=[gr.Audio(label="Output", type="numpy"), gr.Audio(label="Output", type="numpy")]
213
 
214
  btn = gr.Button("Submit").style(full_width=True)
215
+ btn.click(text2audio, inputs=[textbox, duration, guidance_scale, seed, n_candidates], outputs=[outputs]) # , share_button, community_icon, loading_icon
216
+ # share_button.click(None, [], [], _js=share_js)
217
  gr.HTML('''
218
  <hr>
219
  <div class="footer" style="text-align: center; max-width: 700px; margin: 0 auto;">
 
232
  )
233
  # <p>This demo is strictly for research demo purpose only. For commercial use please <a href="haoheliu@gmail.com">contact us</a>.</p>
234
 
235
+ iface.queue(concurrency_count = 3)
236
  iface.launch(debug=True)
237
  # iface.launch(debug=True, share=True)