Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

app.py 343 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
  1. from fastapi import FastAPI
  2. from inference import FEPredictor
  3. app = FastAPI(title="MLOps Basics App-S1")
  4. predictor = FEPredictor("./models/1/emotionModel.hdf5")
  5. @app.get("/")
  6. async def home():
  7. return "<h2>This is a sample CV Project</h2>"
  8. @app.get("/predict")
  9. async def get_prediction(img_path: str):
  10. return predictor.infer(img_path)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...