File size: 484 Bytes
c1500c2
 
 
 
337d28b
c1500c2
 
 
 
 
 
 
f915194
 
c1500c2
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os

os.environ["WINDOW_BACKEND"] = "headless"  # Use software rendering
os.environ["SKIP_TORCH"] = "1"
os.environ["DOCKER_RUNTIME"] = "1"
from DepthFlow import DepthFlowScene
import uuid


depthflow = DepthFlowScene()


def make_effect(image_link, filename: str):

    destination = os.path.join("/tmp/Video", filename)
    depthflow.input(image=image_link)
    depthflow.main(
        fps=30,
        output=destination,
        quality=1,
    )
    return {"file": filename}