Update app.py
Browse files
app.py
CHANGED
|
@@ -10,5 +10,30 @@ def greet(n):
|
|
| 10 |
print(zero.device) # <-- 'cuda:0' 🤗
|
| 11 |
return f"Hello {zero + n} Tensor"
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
print(zero.device) # <-- 'cuda:0' 🤗
|
| 11 |
return f"Hello {zero + n} Tensor"
|
| 12 |
|
| 13 |
+
def run():
|
| 14 |
+
with gr.Blocks(css=".gradio-container {background-color: lightgray} #radio_div {background-color: #FFD8B4; font-size: 40px;}") as demo:
|
| 15 |
+
gr.Markdown("<h1 style='text-align: center;'>"+ "One Shot Talking Face from Text" + "</h1><br/><br/>")
|
| 16 |
+
with gr.Group():
|
| 17 |
+
# with gr.Box():
|
| 18 |
+
with gr.Row():
|
| 19 |
+
# with gr.Row().style(equal_height=True):
|
| 20 |
+
image_in = gr.Image(show_label=True, type="filepath",label="Input Image")
|
| 21 |
+
input_text = gr.Textbox(show_label=True,label="Input Text")
|
| 22 |
+
gender = gr.Radio(["Female","Male"],value="Female",label="Gender")
|
| 23 |
+
video_out = gr.Video(show_label=True,label="Output")
|
| 24 |
+
with gr.Row():
|
| 25 |
+
# with gr.Row().style(equal_height=True):
|
| 26 |
+
btn = gr.Button("Generate")
|
| 27 |
+
# gr.Markdown(
|
| 28 |
+
# """
|
| 29 |
+
# <p style='text-align: center;'>Feel free to give us your thoughts on this demo and please contact us at
|
| 30 |
+
# <a href="mailto:letstalk@pragnakalp.com" target="_blank">letstalk@pragnakalp.com</a>
|
| 31 |
+
# <p style='text-align: center;'>Developed by: <a href="https://www.pragnakalp.com" target="_blank">Pragnakalp Techlabs</a></p>
|
| 32 |
+
|
| 33 |
+
# """)
|
| 34 |
+
|
| 35 |
+
btn.click(one_shot, inputs=[image_in,input_text,gender], outputs=[video_out])
|
| 36 |
+
demo.queue()
|
| 37 |
+
|
| 38 |
+
if __name__ == "__main__":
|
| 39 |
+
run()
|