Update app.py
Browse files
app.py
CHANGED
|
@@ -146,20 +146,19 @@ def run():
|
|
| 146 |
"""
|
| 147 |
|
| 148 |
with gr.Blocks(css=custom_css) as demo:
|
| 149 |
-
with gr.
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
</div>
|
| 156 |
-
"""
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
# Audio + texto
|
| 163 |
with gr.Row():
|
| 164 |
input_audio = gr.Audio(label="🎵 Your audio (Optional)")
|
| 165 |
input_text = gr.Textbox(label="💭 Your text", placeholder="Type your text here...")
|
|
@@ -167,15 +166,14 @@ def run():
|
|
| 167 |
# Botón
|
| 168 |
btn = gr.Button("GENERATE", elem_classes=["generate-btn"])
|
| 169 |
|
| 170 |
-
# Salida
|
| 171 |
video_out = gr.Video(label="🎥 Your video", show_label=True, elem_classes=["output-video"])
|
| 172 |
|
| 173 |
-
#
|
| 174 |
btn.click(run_inference, inputs=[input_image, input_audio, input_text], outputs=video_out)
|
| 175 |
|
| 176 |
demo.queue()
|
| 177 |
demo.launch()
|
| 178 |
|
| 179 |
-
|
| 180 |
if __name__ == "__main__":
|
| 181 |
run()
|
|
|
|
| 146 |
"""
|
| 147 |
|
| 148 |
with gr.Blocks(css=custom_css) as demo:
|
| 149 |
+
with gr.Group(elem_id="main-container"):
|
| 150 |
+
|
| 151 |
+
# Encabezado
|
| 152 |
+
with gr.Row(elem_classes="title-container"):
|
| 153 |
+
gr.Markdown("""
|
| 154 |
+
<h1>Talkie</h1>
|
| 155 |
+
<div class='subtitle'>Upload an image, add some audio or text, and watch the magic happen! ✨</div>
|
| 156 |
+
""")
|
| 157 |
+
|
| 158 |
+
# Entradas
|
| 159 |
+
with gr.Row():
|
| 160 |
+
input_image = gr.Image(label="📸 Your image")
|
| 161 |
+
|
|
|
|
| 162 |
with gr.Row():
|
| 163 |
input_audio = gr.Audio(label="🎵 Your audio (Optional)")
|
| 164 |
input_text = gr.Textbox(label="💭 Your text", placeholder="Type your text here...")
|
|
|
|
| 166 |
# Botón
|
| 167 |
btn = gr.Button("GENERATE", elem_classes=["generate-btn"])
|
| 168 |
|
| 169 |
+
# Salida
|
| 170 |
video_out = gr.Video(label="🎥 Your video", show_label=True, elem_classes=["output-video"])
|
| 171 |
|
| 172 |
+
# Evento del botón
|
| 173 |
btn.click(run_inference, inputs=[input_image, input_audio, input_text], outputs=video_out)
|
| 174 |
|
| 175 |
demo.queue()
|
| 176 |
demo.launch()
|
| 177 |
|
|
|
|
| 178 |
if __name__ == "__main__":
|
| 179 |
run()
|