Create huggingface_deploy.py
Browse files- huggingface_deploy.py +16 -0
huggingface_deploy.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# huggingface_deploy.py
|
2 |
+
|
3 |
+
import gradio as gr
|
4 |
+
from generate_video import generate_video
|
5 |
+
|
6 |
+
def huggingface_generate_video(input_image, input_text):
|
7 |
+
return generate_video(input_image, input_text)
|
8 |
+
|
9 |
+
if __name__ == "__main__":
|
10 |
+
iface = gr.Interface(
|
11 |
+
fn=huggingface_generate_video,
|
12 |
+
inputs=["image", "text"],
|
13 |
+
outputs="video",
|
14 |
+
)
|
15 |
+
|
16 |
+
iface.launch()
|