Skip to content

feat: setup media matching [WIP] #784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: feat/media-processing
Choose a base branch
from

Conversation

aatmanvaidya
Copy link
Collaborator

resolves #750

@aatmanvaidya aatmanvaidya requested a review from dennyabrain May 28, 2025 07:31
@python_path Path.expand("lib/python")

def get_embedding(file_path) do
{:ok, py} = Python.start(python_path: @python_path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be something you do in an init function.
my sense is that you can create a port that talks to the python process and keep it open. This py has to be a reference to that port. so best to create it once and then use throughout the functions that talk to the port.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do I do that in elixir? sorry I am bit confused

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am proposing creating a new function init_worker

def init_worker() do
   {:ok, py} = Python.start(python_path: @python_path)
   py
end

and then the calling code can pass py to other functions in this module that might need it. for example Python.call(py ...)

@aatmanvaidya aatmanvaidya changed the base branch from main to feat/media-processing May 28, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement cost effective media matching
2 participants