Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

263 B
Raw Blame
from typing import Callable


def build_line(x1: float, y1: float, x2: float, y2: float) -> Callable[[float], float]:
    """Build a linear function given two points on the line (x1, y1) and (x2, y2)."""
    return lambda x: (y2 - y1) / (x2 - x1) * (x - x1) + y1