Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -120,7 +120,6 @@ def generate_interpolation(gallery):
|
|
| 120 |
mediapy.write_video("out.mp4", frames, fps=15)
|
| 121 |
return "out.mp4"
|
| 122 |
|
| 123 |
-
|
| 124 |
# image generator
|
| 125 |
image_gen = gr.Interface.load("spaces/multimodalart/latentdiffusion")
|
| 126 |
|
|
@@ -147,12 +146,8 @@ with demo:
|
|
| 147 |
b1 = gr.Button("Recognize Speech")
|
| 148 |
b2 = gr.Button("Classify Sentiment")
|
| 149 |
b3 = gr.Button("Save Speech to Text")
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
b2.click(text_to_sentiment, inputs=text, outputs=label)
|
| 153 |
-
b3.click(upsert, inputs=text, outputs=saved)
|
| 154 |
-
# b4.click(selectall, inputs=text, outputs=savedAll)
|
| 155 |
-
|
| 156 |
input_story_type = gr.Radio(choices=['superhero', 'action', 'drama', 'horror', 'thriller', 'sci_fi'], value='sci_fi', label="Genre")
|
| 157 |
input_start_text = gr.Textbox(placeholder='A teddy bear outer space', label="Starting Text")
|
| 158 |
|
|
@@ -170,5 +165,10 @@ with demo:
|
|
| 170 |
button_gen_story.click(fn=generate_story, inputs=[input_story_type , input_start_text], outputs=output_generated_story)
|
| 171 |
button_gen_images.click(fn=generate_images, inputs=output_generated_story, outputs=output_gallery)
|
| 172 |
button_gen_video.click(fn=generate_interpolation, inputs=output_gallery, outputs=output_interpolation)
|
| 173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
demo.launch(debug=True, enable_queue=True)
|
|
|
|
| 120 |
mediapy.write_video("out.mp4", frames, fps=15)
|
| 121 |
return "out.mp4"
|
| 122 |
|
|
|
|
| 123 |
# image generator
|
| 124 |
image_gen = gr.Interface.load("spaces/multimodalart/latentdiffusion")
|
| 125 |
|
|
|
|
| 146 |
b1 = gr.Button("Recognize Speech")
|
| 147 |
b2 = gr.Button("Classify Sentiment")
|
| 148 |
b3 = gr.Button("Save Speech to Text")
|
| 149 |
+
b4 = gr.Button("Retrieve All")
|
| 150 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
input_story_type = gr.Radio(choices=['superhero', 'action', 'drama', 'horror', 'thriller', 'sci_fi'], value='sci_fi', label="Genre")
|
| 152 |
input_start_text = gr.Textbox(placeholder='A teddy bear outer space', label="Starting Text")
|
| 153 |
|
|
|
|
| 165 |
button_gen_story.click(fn=generate_story, inputs=[input_story_type , input_start_text], outputs=output_generated_story)
|
| 166 |
button_gen_images.click(fn=generate_images, inputs=output_generated_story, outputs=output_gallery)
|
| 167 |
button_gen_video.click(fn=generate_interpolation, inputs=output_gallery, outputs=output_interpolation)
|
| 168 |
+
|
| 169 |
+
b1.click(speech_to_text, inputs=audio_file, outputs=input_start_text )
|
| 170 |
+
b2.click(text_to_sentiment, inputs=text, outputs=label)
|
| 171 |
+
b3.click(upsert, inputs=text, outputs=saved)
|
| 172 |
+
b4.click(selectall, inputs=text, outputs=savedAll)
|
| 173 |
+
|
| 174 |
demo.launch(debug=True, enable_queue=True)
|