Spaces:
Running
Running
pragnakalp
commited on
Commit
•
6db7dd2
1
Parent(s):
0483de0
Update app.py
Browse files
app.py
CHANGED
@@ -46,22 +46,30 @@ def run_infrence(input_image,input_audio):
|
|
46 |
output, error = process.communicate()
|
47 |
|
48 |
return audio_video()
|
49 |
-
|
50 |
def run():
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
with gr.Row():
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
|
66 |
if __name__ == "__main__":
|
67 |
run()
|
|
|
46 |
output, error = process.communicate()
|
47 |
|
48 |
return audio_video()
|
49 |
+
|
50 |
def run():
|
51 |
+
with gr.Blocks(css=".gradio-container {background-color: lightgray} #radio_div {background-color: #FFD8B4; font-size: 40px;} h3,h1,h2,p {color: black;}") as demo:
|
52 |
+
gr.Markdown("<p style='text-align: left;font-size:18px'>"+ "Hey, check out our Gradio app! It's like having a magic tool for making videos. You put in a picture and audio, and it creates a video where the lips move perfectly with the audio. It's super easy – just upload your picture and audio, and click 'generate'! You've got a cool video where it looks like the person in the picture is speaking." + "</p>")
|
53 |
+
with gr.Group():
|
54 |
+
with gr.Row():
|
55 |
+
input_image = gr.Image(label="Input Image")
|
56 |
+
input_audio = gr.Audio(label="Input Audio")
|
57 |
+
video_out = gr.Video(show_label=True,label="Output")
|
58 |
+
with gr.Row():
|
59 |
+
btn = gr.Button("Generate")
|
60 |
+
gr.Markdown("<h1 style='text-align: center;'>"+ "Demo Inputs and Output" + "</h1>")
|
61 |
with gr.Row():
|
62 |
+
gr.Image("sample/spark.png",label="Input Image")
|
63 |
+
gr.Audio("sample/spark_1.1.mp3",label="Input Audio")
|
64 |
+
gr.Video("sample/final_output.mp4",label="Output")
|
65 |
+
|
66 |
+
gr.Markdown("""<p style='text-align: center;'>Feel free to give us your thoughts on this demo and please contact us at
|
67 |
+
<a href="mailto:[email protected]" target="_blank">[email protected]</a>
|
68 |
+
</p><p style='text-align: center;'>Developed by: <a href="https://www.pragnakalp.com" target="_blank">Pragnakalp Techlabs</a></p>""")
|
69 |
|
70 |
+
btn.click(run_infrence,inputs=[input_image,input_audio], outputs=[video_out])
|
71 |
+
demo.queue()
|
72 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
73 |
|
74 |
if __name__ == "__main__":
|
75 |
run()
|