Files
ProjectIOT/pico_files/functions.py
2025-06-14 10:18:40 +02:00

17 lines
326 B
Python

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())