Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,14 +13,7 @@ def get_images(prompt):
|
|
13 |
gallery_dir = stable_diffusion(prompt, fn_index=2)
|
14 |
return [os.path.join(gallery_dir, img) for img in os.listdir(gallery_dir)]
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
whisper_results = translate_better(audio)
|
19 |
-
prompt = whisper_results[1]
|
20 |
-
images = get_images(prompt)
|
21 |
-
|
22 |
-
return whisper_results[0], whisper_results[1], images
|
23 |
-
|
24 |
def translate_better(audio):
|
25 |
print("""
|
26 |
—
|
@@ -88,17 +81,13 @@ with gr.Blocks() as demo:
|
|
88 |
)
|
89 |
|
90 |
sd_output = gr.Gallery().style(grid=2, height="auto")
|
91 |
-
|
92 |
inputs = [
|
93 |
-
record_input
|
94 |
-
guidance_scale,
|
95 |
-
nb_iterations,
|
96 |
-
seed
|
97 |
],
|
98 |
outputs = [
|
99 |
transcripted_output,
|
100 |
translated_output,
|
101 |
-
sd_output
|
102 |
])
|
103 |
audio_r_direct_sd.click(get_images,
|
104 |
inputs = [
|
|
|
13 |
gallery_dir = stable_diffusion(prompt, fn_index=2)
|
14 |
return [os.path.join(gallery_dir, img) for img in os.listdir(gallery_dir)]
|
15 |
|
16 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
def translate_better(audio):
|
18 |
print("""
|
19 |
—
|
|
|
81 |
)
|
82 |
|
83 |
sd_output = gr.Gallery().style(grid=2, height="auto")
|
84 |
+
audio_r_translate.click(translate_better,
|
85 |
inputs = [
|
86 |
+
record_input
|
|
|
|
|
|
|
87 |
],
|
88 |
outputs = [
|
89 |
transcripted_output,
|
90 |
translated_output,
|
|
|
91 |
])
|
92 |
audio_r_direct_sd.click(get_images,
|
93 |
inputs = [
|