Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for prewitt (0.2 sec)

  1. docs_src/events/tutorial003.py

        yield
        # Clean up the ML models and release the resources
        ml_models.clear()
    
    
    app = FastAPI(lifespan=lifespan)
    
    
    @app.get("/predict")
    async def predict(x: float):
        result = ml_models["answer_to_everything"](x)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 07 15:46:00 GMT 2023
    - 569 bytes
    - Viewed (0)
  2. docs/en/docs/release-notes.md

        yield
        # Clean up the ML models and release the resources
        ml_models.clear()
    
    
    app = FastAPI(lifespan=lifespan)
    
    
    @app.get("/predict")
    async def predict(x: float):
        result = ml_models["answer_to_everything"](x)
        return {"result": result}
    ```
    
    **Note**: This is the recommended way going forward, instead of using `startup` and `shutdown` events.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  3. tests/test_tutorial/test_events/test_tutorial003.py

                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/predict": {
                        "get": {
                            "summary": "Predict",
                            "operationId": "predict_predict_get",
                            "parameters": [
                                {
                                    "required": True,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.6K bytes
    - Viewed (0)
Back to top