Spaces:
Runtime error
Runtime error
Update app.py
Browse files3 unmodified lines45678989 unmodified lines991001011021031041051061071081092 unmodified lines1121131141151161171181191201213 unmodified lineshf_token = os.environ.get("HF_TKN")def get_instantID(portrait_in, condition_pose, prompt):client = Client("https://fffiloni-instantid.hf.space/", hf_token=hf_token)negative_prompt = "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green"89 unmodified linesGenerate live camera shot from input face</p>""")with gr.Group():with gr.Row():with gr.Column():face_in = gr.Image(type="filepath", label="Face to copy")with gr.Column():camera_shot = gr.Dropdown(label = "Camera Shot",info = "Use standard camera shots vocabulary, or drop your custom shot as conditional pose (1280*720 ratio is recommended)",2 unmodified lines],value = "custom")condition_shot = gr.Image(type="filepath", label="Custom conditional shot (Optional)")prompt = gr.Textbox(label="Prompt")chosen_model = gr.Radio(label="Choose a model", choices=["i2vgen-xl", "stable-video"], value="i2vgen-xl", interactive=False, visible=False)with gr.Column():submit_btn = gr.Button("Submit")video_out = gr.Video()3 unmodified lines4567891011121389 unmodified lines1031041051061071081091101111121131142 unmodified lines1171181191201211221231241251261271283 unmodified lineshf_token = os.environ.get("HF_TKN")from style_template import stylesSTYLE_NAMES = list(styles.keys())DEFAULT_STYLE_NAME = "Watercolor"def get_instantID(portrait_in, condition_pose, prompt):client = Client("https://fffiloni-instantid.hf.space/", hf_token=hf_token)negative_prompt = "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green"89 unmodified linesGenerate live camera shot from input face</p>""")with gr.Row():with gr.Column():face_in = gr.Image(type="filepath", label="Face to copy")with gr.Column():with gr.Row():camera_shot = gr.Dropdown(label = "Camera Shot",info = "Use standard camera shots vocabulary, or drop your custom shot as conditional pose (1280*720 ratio is recommended)",2 unmodified lines],value = "custom")style = gr.Dropdown(label="Style template", choices=STYLE_NAMES, value=DEFAULT_STYLE_NAME)condition_shot = gr.Image(type="filepath", label="Custom conditional shot (Optional)")prompt = gr.Textbox(label="Prompt")chosen_model = gr.Radio(label="Choose a model", choices=["i2vgen-xl", "stable-video"], value="i2vgen-xl", interactive=False, visible=False)with gr.Column():submit_btn = gr.Button("Submit")video_out = gr.Video()
app.py+16-9