urwebsiteaz-ux commited on
Commit
d4708fc
·
1 Parent(s): adadf29

fix: move launch() to module level, fix gr.Examples for HF Spaces

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -147,6 +147,9 @@ with gr.Blocks(theme=THEME, css=CSS, title="AUTOLYRICS") as demo:
147
  ["examples/rap_clip.wav", 5, "Both (compare)"],
148
  ],
149
  inputs=[audio, beams, choice],
 
 
 
150
  )
151
 
152
  run_btn.click(
@@ -155,5 +158,4 @@ with gr.Blocks(theme=THEME, css=CSS, title="AUTOLYRICS") as demo:
155
  outputs=[base_out, ft_out, base_meta, ft_meta, meta],
156
  )
157
 
158
- if __name__ == "__main__":
159
- demo.queue(max_size=12).launch()
 
147
  ["examples/rap_clip.wav", 5, "Both (compare)"],
148
  ],
149
  inputs=[audio, beams, choice],
150
+ outputs=[base_out, ft_out, base_meta, ft_meta, meta],
151
+ fn=run,
152
+ cache_examples=False,
153
  )
154
 
155
  run_btn.click(
 
158
  outputs=[base_out, ft_out, base_meta, ft_meta, meta],
159
  )
160
 
161
+ demo.queue(max_size=12).launch()