Skip to content
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

cannot host in server with mod_wsgi #2

Open
hussainanver52 opened this issue May 15, 2019 · 1 comment
Open

cannot host in server with mod_wsgi #2

hussainanver52 opened this issue May 15, 2019 · 1 comment

Comments

@hussainanver52
Copy link

Hi I added all the dependencies and when i run python server.py, it works perfectly, but when i host it in server and run home page is loaded and when i try to train image or do a prediction it gives error as pnet is not defined. Following is the server setup
apache, mod-wsgi, and all python dependencies as mentioned in ur site,
Any help would be appreciated

@tamerthamoqa
Copy link
Owner

tamerthamoqa commented May 17, 2019

Hi hussainanver52,

I am not sure to be honest. Since the server is running the pnet model part of the MTCNN face detection model should be loaded when the server starts. Could you add a screenshot or the log of the entire error?

Edit on 23/8/2020:
Refer to this issue #14

Assuming the issue is the same as the linked issue above:

Running 'python server.py' would fix the issue, running the flask app via the 'flask run' method would not work as the models would be defined in the 'if __ name __ == ' __ main __ ': ' block and the __ name __ variable would not equal '__ main __' in this case.

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

No branches or pull requests

2 participants