fix(api): update serve app name, add module entrypoint
This commit is contained in:
parent
599e0ee2d0
commit
b59519cb7e
|
@ -216,7 +216,7 @@ create them, if you are using the default settings. You can customize the paths
|
|||
In the `api/` directory, run the server with Flask:
|
||||
|
||||
```shell
|
||||
> flask --app=onnx_web run
|
||||
> flask --app=onnx_web.serve run
|
||||
```
|
||||
|
||||
Note the IP address this prints.
|
||||
|
@ -224,7 +224,7 @@ Note the IP address this prints.
|
|||
If you want to access the server from other machines on your local network, pass the `--host` argument:
|
||||
|
||||
```shell
|
||||
> flask --app=onnx_web run --host=0.0.0.0
|
||||
> flask --app=onnx_web.serve run --host=0.0.0.0
|
||||
```
|
||||
|
||||
This will listen for requests from your current local network and may be dangerous.
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
.coverage
|
||||
coverage.xml
|
||||
|
||||
*.swp
|
||||
*.pyc
|
||||
|
||||
__pycache__/
|
||||
dist/
|
||||
htmlcov/
|
||||
onnx_env/
|
||||
venv/
|
||||
venv/
|
||||
|
||||
*.egg-info/
|
||||
**/__pycache__/
|
||||
|
|
|
@ -13,4 +13,4 @@ RUN pip install -r requirements.txt
|
|||
|
||||
COPY onnx_web/ /onnx-web/onnx_web/
|
||||
|
||||
ENTRYPOINT [ "flask", "--app=onnx_web", "run", "--host=0.0.0.0" ]
|
||||
ENTRYPOINT [ "flask", "--app=onnx_web.serve", "run", "--host=0.0.0.0" ]
|
||||
|
|
|
@ -12,4 +12,4 @@ RUN pip install -r requirements.txt
|
|||
|
||||
COPY onnx_web/ /onnx-web/onnx_web/
|
||||
|
||||
ENTRYPOINT [ "flask", "--app=onnx_web", "run", "--host=0.0.0.0" ]
|
||||
ENTRYPOINT [ "flask", "--app=onnx_web.serve", "run", "--host=0.0.0.0" ]
|
||||
|
|
|
@ -19,7 +19,7 @@ test:
|
|||
package: package-dist package-upload
|
||||
|
||||
package-dist:
|
||||
python ./setup.py sdist
|
||||
python3 ./setup.py sdist
|
||||
|
||||
package-upload:
|
||||
twine upload dist/*
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
from onnx_web.serve import get_and_clamp, get_from_map, get_latents_from_seed, load_pipeline
|
Loading…
Reference in New Issue