rahul7star commited on
Commit
c1f7300
·
verified ·
1 Parent(s): 69e7be6

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from huggingface_hub import snapshot_download
3
+
4
+ MODEL_DIR = "./weights/ckpts/hunyuan-video-t2v-720p"
5
+ CHECKPOINT_PATH = os.path.join(MODEL_DIR, "transformers", "mp_rank_00_model_states.pt")
6
+
7
+ if not os.path.exists(CHECKPOINT_PATH):
8
+ snapshot_download(
9
+ repo_id="tencent/HunyuanVideo-Avatar",
10
+ local_dir=MODEL_DIR,
11
+ local_dir_use_symlinks=False
12
+ )
13
+
14
+ # Now import and launch Gradio UI
15
+ import gradio as gr
16
+ def run_app(input):
17
+ return "Model is loaded!"
18
+ gr.Interface(fn=run_app, inputs="text", outputs="text").launch()