8 Star 100 Fork 31

CV_Lab / YOLOv5-RT-TFJS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
server.py 622 Bytes
一键复制 编辑 原始数据 按行查看 历史
代码阿尔法 提交于 2022-03-29 10:55 . import isort
from fastapi import FastAPI, Request
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
app = FastAPI()
templates = Jinja2Templates(directory="templates")
app.mount("/templates", StaticFiles(directory="templates"), name="templates")
app.mount("/static", StaticFiles(directory="static"), name="static")
@app.get("/")
async def root(request: Request):
return templates.TemplateResponse("index.html", {"request": request})
if __name__ == "__main__":
import uvicorn
app_str = "server:app"
uvicorn.run(app_str, host="localhost", port=8000, reload=True, workers=1)
JavaScript
1
https://gitee.com/CV_Lab/yolov5_rt_tfjs.git
git@gitee.com:CV_Lab/yolov5_rt_tfjs.git
CV_Lab
yolov5_rt_tfjs
YOLOv5-RT-TFJS
master

搜索帮助