![import time, base64 from runwayml import RunwayML client = RunwayML() image = './image.jpg' # encode image to base64 with open(image, "rb") as f: base64_image = base64.b64encode(f.read()).decode("utf-8") # Create a new image-to-video task using the "gen3a_turbo" model task = client.image_to_video.create( model='gen3a_turbo', # Point this at your own image file prompt_image=f"data:image/png;base64,{base64_image}", prompt_text='Generate a video walking down the alley', ) task_id = task.id # Poll the task until it's complete time.sleep(10) # Wait for a second before polling task = client.tasks.retrieve(task_id) while task.status not in ['SUCCEEDED', 'FAILED']: time.sleep(10) # Wait for ten seconds before polling task = client.tasks.retrieve(task_id) print('Task complete:', task)](https://pbs.twimg.com/media/Gcje-AGaMAInGeW.jpg?name=small&format=webp)
ALT import time, base64 from runwayml import RunwayML client = RunwayML() image = './image.jpg' # encode image to base64 with open(image, "rb") as f: base64_image = base64.b64encode(f.read()).decode("utf-8") # Create a new image-to-video task using the "gen3a_turbo" model task = client.image_to_video.create( model='gen3a_turbo', # Point this at your own image file prompt_image=f"data:image/png;base64,{base64_image}", prompt_text='Generate a video walking down the alley', ) task_id = task.id # Poll the task until it's complete time.sleep(10) # Wait for a second before polling task = client.tasks.retrieve(task_id) while task.status not in ['SUCCEEDED', 'FAILED']: time.sleep(10) # Wait for ten seconds before polling task = client.tasks.retrieve(task_id) print('Task complete:', task)









