I am getting an issue with pycall specifically in the ruby-spacy package. I am able to import it and run nlp.read inside the console without issues but while running the same code on controller it hangs and never resolves without no issues printing
Current Code
require "ruby-spacy"
class Api::V1::Spacy < ApplicationController
def inbound
nlp = Spacy::Language.new(Rails.root.join("app/assets/model"))
doc = nlp.read("Hello world")
puts doc.ents
return render json: { doc.ents }
rescue => e
puts e
head :internal_server_error
end
end
Hey @maks112v
I have the same issue with ruby-spacy. It hangs the process when I call Spacy::Language.new in a server process or in a background job. Did you manage to solve it?
I am getting an issue with pycall specifically in the ruby-spacy package. I am able to import it and run
nlp.read
inside the console without issues but while running the same code on controller it hangs and never resolves without no issues printingCurrent Code
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin21] Rails 7.0.2.3 Python 3.10.1 with shared enabled