Afrinetwork7
commited on
Commit
•
53c59c7
1
Parent(s):
ad3f3da
Update app.py
Browse files
app.py
CHANGED
@@ -214,33 +214,33 @@ with gr.Blocks(css=css) as demo:
|
|
214 |
cache_examples=CACHE_EXAMPLES,
|
215 |
)
|
216 |
use_negative_prompt.change(
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
|
245 |
if __name__ == "__main__":
|
246 |
-
|
|
|
214 |
cache_examples=CACHE_EXAMPLES,
|
215 |
)
|
216 |
use_negative_prompt.change(
|
217 |
+
fn=lambda x: gr.update(visible=x),
|
218 |
+
inputs=use_negative_prompt,
|
219 |
+
outputs=negative_prompt,
|
220 |
+
api_name=False,
|
221 |
+
)
|
222 |
+
|
223 |
+
gr.on(
|
224 |
+
triggers=[
|
225 |
+
audio.upload,
|
226 |
+
negative_prompt.submit,
|
227 |
+
run_button.click,
|
228 |
+
],
|
229 |
+
fn=generate,
|
230 |
+
inputs=[
|
231 |
+
audio,
|
232 |
+
input_lang,
|
233 |
+
negative_prompt,
|
234 |
+
use_negative_prompt,
|
235 |
+
seed,
|
236 |
+
width,
|
237 |
+
height,
|
238 |
+
guidance_scale,
|
239 |
+
randomize_seed,
|
240 |
+
],
|
241 |
+
outputs=[result, seed],
|
242 |
+
api_name="run",
|
243 |
+
)
|
244 |
|
245 |
if __name__ == "__main__":
|
246 |
+
demo.queue(max_size=20).launch()
|