mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-30 11:19:57 +00:00
Update
This commit is contained in:
16
pico_files/functions.py
Normal file
16
pico_files/functions.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from pyplatex import ANPR
|
||||
import asyncio
|
||||
import torch
|
||||
from ultralytics.nn.tasks import DetectionModel
|
||||
|
||||
torch.serialization.add_safe_globals({"DetectionModel": DetectionModel})
|
||||
|
||||
|
||||
async def main():
|
||||
anpr = ANPR()
|
||||
plates = await anpr.detect("car.jpg")
|
||||
print(plates)
|
||||
|
||||
|
||||
# Run the async main function
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user