https://github.com/ukuleleplayer/DeepIE3D We will build the environment of Deep IE 3D in.
With the developer's github Frontend
webdev build--output web:build
Backend
gcloud app deploy
However, since these are commands for release, they are not suitable for development.
macOS Catalina 10.15.4 Python 3.7.4 Dart VM version: 2.6.0 webdev 2.5.6 pip 19.0.3
(Click here for how to downgrade dart sdk https://qiita.com/sk161717/items/d44fed3464bc7c9f0d6b)
https://github.com/ukuleleplayer/DeepIE3D Will be cloned locally. Frontend In the local DeepIE3D_Frontend folder
webdev serve --auto=restart --launch-in-chrome --debug
Execute. You will be able to access the front desk at localhost: 8080. Backend Modify main.py in the local / DeepIE3D / DeepIE3D_Backend.
main.py
@APP.after_request
def add_cors(response):
'''
Add CORS header(s) to every response from valid sites
Allow:
- Origin from everywhere
- Content-Type to be shown in headers
- GET, POST and OPTIONS methos
'''
#r = request.referrer[:-1]
#if r in ['http://localhost:8080', 'localhost:8080', 'https://localhost:8080',
# 'https://adrianwesth.dk', 'https://www.adrianwesth.dk']:
response.headers.add('Access-Control-Allow-Origin', '*')
response.headers.add('Access-Control-Allow-Headers',
'Content-Type,Authorization')
response.headers.add('Access-Control-Allow-Methods',
'GET,POST,OPTIONS')
return response
Changes: Comment out the middle three lines.
python main.py
Backend is set on localhost: 5000.
http://127.0.0.1:8080/
If you access, you should be able to move it freely as soon as the initialization is completed.
Recommended Posts