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:
|
In the `api/` directory, run the server with Flask:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
> flask --app=onnx_web run
|
> flask --app=onnx_web.serve run
|
||||||
```
|
```
|
||||||
|
|
||||||
Note the IP address this prints.
|
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:
|
If you want to access the server from other machines on your local network, pass the `--host` argument:
|
||||||
|
|
||||||
```shell
|
```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.
|
This will listen for requests from your current local network and may be dangerous.
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
.coverage
|
.coverage
|
||||||
coverage.xml
|
coverage.xml
|
||||||
|
|
||||||
|
*.swp
|
||||||
|
*.pyc
|
||||||
|
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
dist/
|
||||||
htmlcov/
|
htmlcov/
|
||||||
onnx_env/
|
onnx_env/
|
||||||
venv/
|
venv/
|
||||||
|
|
||||||
|
*.egg-info/
|
||||||
|
**/__pycache__/
|
||||||
|
|
|
@ -13,4 +13,4 @@ RUN pip install -r requirements.txt
|
||||||
|
|
||||||
COPY onnx_web/ /onnx-web/onnx_web/
|
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/
|
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: package-dist package-upload
|
||||||
|
|
||||||
package-dist:
|
package-dist:
|
||||||
python ./setup.py sdist
|
python3 ./setup.py sdist
|
||||||
|
|
||||||
package-upload:
|
package-upload:
|
||||||
twine upload dist/*
|
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