Spaces:
Runtime error
Runtime error
File size: 493 Bytes
dfbe385 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import numpy as np
from PIL import Image
from .abstract_guessr import AbstractGuessr
from ..interfaces import Coordinate
class RandomGuessr(AbstractGuessr):
"""Guesses a random coordinate
"""
@staticmethod
def _random_coordinate() -> Coordinate:
return Coordinate(
latitude=np.random.uniform(-90, 90),
longitude=np.random.uniform(-180, 180)
)
def guess(self, image: Image) -> Coordinate:
return self._random_coordinate()
|