mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-30 11:19:57 +00:00
22 lines
468 B
Python
22 lines
468 B
Python
from ultralytics.nn.tasks import DetectionModel # type: ignore
|
|
import torch
|
|
from application import app
|
|
from application.api.views import api_blueprint
|
|
|
|
|
|
torch.serialization.add_safe_globals( # type: ignore
|
|
{"DetectionModel": DetectionModel} # type: ignore
|
|
)
|
|
|
|
app.register_blueprint(api_blueprint)
|
|
|
|
|
|
# Default app route
|
|
@app.route("/")
|
|
def home():
|
|
return "Hello, World!"
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.run(host="192.168.137.1", port=2222, debug=True)
|