Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

Commit

Permalink
fix: move to new definition, fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
1hachem committed Mar 9, 2024
1 parent b6e765e commit 0d199ad
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pytube import YouTube

from hyko_sdk.io import Video
from hyko_sdk.types import Ext
from hyko_sdk.models import Ext


def download_video(url, resolution):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pydantic import Field

from hyko_sdk.definitions import SDKFunction
from hyko_sdk.definitions import ToolkitFunction
from hyko_sdk.io import Video
from hyko_sdk.models import CoreModel

Expand All @@ -15,7 +15,11 @@ class Resolution(str, Enum):
lowest = "lowest"


func = SDKFunction(description="Download a video from YouTube.")
func = ToolkitFunction(
name="youtube_downloader",
task="downloaders",
description="Download a video from YouTube.",
)


@func.set_input
Expand Down
2 changes: 1 addition & 1 deletion hyko_toolkit/functions/plotting/bivariate_plot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from metadata import Inputs, Outputs, Params, func

from hyko_sdk.io import Image
from hyko_sdk.types import Ext
from hyko_sdk.models import Ext


def generate_violin_plot(x: list[float], y: list[float]):
Expand Down
6 changes: 4 additions & 2 deletions hyko_toolkit/functions/plotting/bivariate_plot/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pydantic import Field

from hyko_sdk.definitions import SDKFunction
from hyko_sdk.definitions import ToolkitFunction
from hyko_sdk.io import Image
from hyko_sdk.models import CoreModel

Expand All @@ -18,7 +18,9 @@ class SupportedPlots(str, Enum):
Scatter_Plot = "Scatter_Plot"


func = SDKFunction(
func = ToolkitFunction(
name="bivariate_plot",
task="plotting",
description="Generate various types of plots with (X , Y) inputs.",
)

Expand Down
2 changes: 1 addition & 1 deletion hyko_toolkit/functions/plotting/univariate_plot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from metadata import Inputs, Outputs, Params, func

from hyko_sdk.io import Image
from hyko_sdk.types import Ext
from hyko_sdk.models import Ext


def generate_pie_chart(y: list[float]):
Expand Down
6 changes: 4 additions & 2 deletions hyko_toolkit/functions/plotting/univariate_plot/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pydantic import Field

from hyko_sdk.definitions import SDKFunction
from hyko_sdk.definitions import ToolkitFunction
from hyko_sdk.io import Image
from hyko_sdk.models import CoreModel

Expand All @@ -12,7 +12,9 @@ class SupportedPlots(str, Enum):
Histogram = "Histogram"


func = SDKFunction(
func = ToolkitFunction(
name="univariate_plot",
task="plotting",
description="Generate various types of plots with Y input.",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from rembg import remove

from hyko_sdk.io import Image
from hyko_sdk.types import Ext
from hyko_sdk.models import Ext


@func.on_execute
Expand Down

0 comments on commit 0d199ad

Please sign in to comment.