We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running the model via docker run, POSTing to the endpoint with the image parameter set to a url (with or without the leading @) returns HTTP 400:
docker run
POST
image
@
{"message": "Could not convert file input image to Path"}
Changing the type to str resolves the issue. Also, the following import is missing:
type
str
from urllib.request import urlopen
Edit: we also need to check for an empty string:
--- a/predict.py +++ b/predict.py @@ -140,7 +140,7 @@ class Predictor(cog.Predictor): toksX, toksY = self.args.size[0] // f, self.args.size[1] // f sideX, sideY = toksX * f, toksY * f - if image is not None: + if image: self.args.init_image = str(image) self.args.step_size = 0.25 if "http" in self.args.init_image:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When running the model via
docker run
,POST
ing to the endpoint with theimage
parameter set to a url (with or without the leading@
) returns HTTP 400:Changing the
type
tostr
resolves the issue. Also, the following import is missing:Edit: we also need to check for an empty string:
The text was updated successfully, but these errors were encountered: