Spaces:
Runtime error
Runtime error
Commit
·
f1099a0
1
Parent(s):
320b085
Update main.py
Browse files
main.py
CHANGED
@@ -28,7 +28,7 @@ def generate_random_image(width: int, height: int) -> np.ndarray:
|
|
28 |
|
29 |
def draw_trace(image: np.ndarray, previous_actions: List[Tuple[str, List[int]]]) -> np.ndarray:
|
30 |
pil_image = Image.fromarray(image)
|
31 |
-
pil_image = Image.open('image_3.png')
|
32 |
draw = ImageDraw.Draw(pil_image)
|
33 |
flag = True
|
34 |
prev_x, prev_y = None, None
|
@@ -154,7 +154,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
154 |
previous_actions = []
|
155 |
positions = ['496~61', '815~335', '815~335', '815~335', '787~342', '749~345', '749~345', '703~346', '703~346', '654~347', '604~349', '604~349', '555~353', '509~357', '509~357']
|
156 |
positions = ['815~335', '787~342', '787~342', '749~345', '703~346', '703~346', '654~347', '654~347', '604~349', '555~353', '555~353', '509~357', '509~357', '468~362', '431~368', '431~368']
|
157 |
-
positions = positions[:4]
|
158 |
try:
|
159 |
while True:
|
160 |
try:
|
|
|
28 |
|
29 |
def draw_trace(image: np.ndarray, previous_actions: List[Tuple[str, List[int]]]) -> np.ndarray:
|
30 |
pil_image = Image.fromarray(image)
|
31 |
+
#pil_image = Image.open('image_3.png')
|
32 |
draw = ImageDraw.Draw(pil_image)
|
33 |
flag = True
|
34 |
prev_x, prev_y = None, None
|
|
|
154 |
previous_actions = []
|
155 |
positions = ['496~61', '815~335', '815~335', '815~335', '787~342', '749~345', '749~345', '703~346', '703~346', '654~347', '604~349', '604~349', '555~353', '509~357', '509~357']
|
156 |
positions = ['815~335', '787~342', '787~342', '749~345', '703~346', '703~346', '654~347', '654~347', '604~349', '555~353', '555~353', '509~357', '509~357', '468~362', '431~368', '431~368']
|
157 |
+
#positions = positions[:4]
|
158 |
try:
|
159 |
while True:
|
160 |
try:
|