1
0
Fork 0

fix(api): update serve app name, add module entrypoint

This commit is contained in:
Sean Sube 2023-01-06 16:18:53 -06:00
parent 599e0ee2d0
commit b59519cb7e
8 changed files with 14 additions and 6 deletions

View File

@ -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.

9
api/.gitignore vendored
View File

@ -1,7 +1,14 @@
.coverage
coverage.xml
*.swp
*.pyc
__pycache__/
dist/
htmlcov/
onnx_env/
venv/
venv/
*.egg-info/
**/__pycache__/

View File

@ -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" ]

View File

@ -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" ]

View File

@ -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
api/README.md Normal file
View File

1
api/onnx_web/__init__.py Normal file
View File

@ -0,0 +1 @@
from onnx_web.serve import get_and_clamp, get_from_map, get_latents_from_seed, load_pipeline

0
gui/README.md Normal file
View File