pixano.app.serve
App(library_dir, media_dir, models_dir=None, aws_endpoint=None, aws_region=None, aws_access_key=None, aws_secret_key=None, host='127.0.0.1', port=8000, pixano_inference_url=None)
The Pixano app.
Attributes:
Name | Type | Description |
---|---|---|
app |
FastAPI
|
FastAPI App. |
config |
Config
|
App config. |
server |
Server
|
App server. |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
library_dir
|
str
|
Local or S3 path to dataset library |
required |
media_dir
|
str
|
Local or S3 path to media library |
required |
models_dir
|
str | None
|
Path to your models. If not provided, and library_dir is not a S3 path, it is set to library_dir/models. |
None
|
aws_endpoint
|
str | None
|
S3 endpoint URL, use 'AWS' if not provided. Used if library_dir is an S3 path. |
None
|
aws_region
|
str | None
|
S3 region name, not always required for private storages. Used if library_dir is an S3 path. |
None
|
aws_access_key
|
str | None
|
S3 AWS access key. Used if library_dir is an S3 path. |
None
|
aws_secret_key
|
str | None
|
S3 AWS secret key. Used if library_dir is an S3 path. |
None
|
host
|
str
|
App host. |
'127.0.0.1'
|
port
|
int
|
App port. |
8000
|
pixano_inference_url
|
str | None
|
Pixano inference URL if any. |
None
|
Source code in pixano/app/serve.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|
display(height=1000)
Display the Pixano app.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
height
|
int
|
Frame height. |
1000
|
Source code in pixano/app/serve.py
get_env()
Get the app's current running environment.
Returns:
Type | Description |
---|---|
str
|
Running environment. |
Source code in pixano/app/serve.py
main(library_dir, media_dir, models_dir, aws_endpoint, aws_region, aws_access_key, aws_secret_key, host, port, pixano_inference_url)
Launch Pixano App in LIBRARY_DIR.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
library_dir
|
str
|
Local or S3 path to dataset library. |
required |
media_dir
|
str
|
Local or S3 path to media library. |
required |
models_dir
|
str
|
Path to your models. If not provided, and library_dir is not a S3 path, it is set to library_dir/models. |
required |
aws_endpoint
|
str
|
S3 endpoint URL, use 'AWS' if not provided. |
required |
aws_region
|
str
|
S3 region name, not always required for private storages. |
required |
aws_access_key
|
str
|
S3 AWS access key. |
required |
aws_secret_key
|
str
|
S3 AWS secret key. |
required |
host
|
str
|
App host. |
required |
port
|
int
|
App port. |
required |
pixano_inference_url
|
str
|
Pixano inference URL. |
required |
Source code in pixano/app/serve.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
|