Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ML (0.21 sec)

  1. docs_src/events/tutorial003.py

    from fastapi import FastAPI
    
    
    def fake_answer_to_everything_ml_model(x: float):
        return x * 42
    
    
    ml_models = {}
    
    
    @asynccontextmanager
    async def lifespan(app: FastAPI):
        # Load the ML model
        ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model
        yield
        # Clean up the ML models and release the resources
        ml_models.clear()
    
    
    app = FastAPI(lifespan=lifespan)
    
    
    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. tests/test_tutorial/test_events/test_tutorial003.py

    from docs_src.events.tutorial003 import (
        app,
        fake_answer_to_everything_ml_model,
        ml_models,
    )
    
    
    def test_events():
        assert not ml_models, "ml_models should be empty"
        with TestClient(app) as client:
            assert ml_models["answer_to_everything"] == fake_answer_to_everything_ml_model
            response = client.get("/predict", params={"x": 2})
    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)
  3. docs/language_names.yml

    lb: Lëtzebuergesch
    lg: Luganda
    li: Limburgs
    ln: Lingála
    lo: ພາສາ
    lt: lietuvių kalba
    lu: Tshiluba
    lv: latviešu valoda
    mg: fiteny malagasy
    mh: Kajin M̧ajeļ
    mi: te reo Māori
    mk: македонски јазик
    ml: മലയാളം
    mn: Монгол хэл
    mr: मराठी
    ms: Bahasa Malaysia
    mt: Malti
    my: ဗမာစာ
    na: Ekakairũ Naoero
    nb: Norsk bokmål
    nd: isiNdebele
    ne: नेपाली
    ng: Owambo
    nl: Nederlands
    nn: Norsk nynorsk
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 22 19:42:53 GMT 2024
    - 3.1K bytes
    - Viewed (0)
Back to top