Spaces:
Runtime error
Runtime error
Commit
·
ddf2486
1
Parent(s):
fd35ae8
Update main.py
Browse files
main.py
CHANGED
|
@@ -13,7 +13,7 @@ import os
|
|
| 13 |
import time
|
| 14 |
|
| 15 |
DEBUG = True
|
| 16 |
-
DEBUG_TEACHER_FORCING =
|
| 17 |
app = FastAPI()
|
| 18 |
|
| 19 |
# Mount the static directory to serve HTML, JavaScript, and CSS files
|
|
@@ -341,7 +341,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
| 341 |
x, y, action_type = parse_action_string(position)
|
| 342 |
mouse_position = (x, y)
|
| 343 |
previous_actions.append((action_type, mouse_position))
|
| 344 |
-
|
| 345 |
|
| 346 |
# Log the start time
|
| 347 |
start_time = time.time()
|
|
@@ -353,7 +353,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
| 353 |
# Load and append the corresponding ground truth image instead of model output
|
| 354 |
print ('here4', len(previous_frames))
|
| 355 |
img = Image.open(f"record_100/image_{82+len(previous_frames)}.png")
|
| 356 |
-
previous_frames.append(img)
|
| 357 |
#previous_frames.append(next_frame_append)
|
| 358 |
|
| 359 |
# Convert the numpy array to a base64 encoded image
|
|
|
|
| 13 |
import time
|
| 14 |
|
| 15 |
DEBUG = True
|
| 16 |
+
DEBUG_TEACHER_FORCING = False
|
| 17 |
app = FastAPI()
|
| 18 |
|
| 19 |
# Mount the static directory to serve HTML, JavaScript, and CSS files
|
|
|
|
| 341 |
x, y, action_type = parse_action_string(position)
|
| 342 |
mouse_position = (x, y)
|
| 343 |
previous_actions.append((action_type, mouse_position))
|
| 344 |
+
previous_actions = [(action_type, mouse_position)]
|
| 345 |
|
| 346 |
# Log the start time
|
| 347 |
start_time = time.time()
|
|
|
|
| 353 |
# Load and append the corresponding ground truth image instead of model output
|
| 354 |
print ('here4', len(previous_frames))
|
| 355 |
img = Image.open(f"record_100/image_{82+len(previous_frames)}.png")
|
| 356 |
+
#previous_frames.append(img)
|
| 357 |
#previous_frames.append(next_frame_append)
|
| 358 |
|
| 359 |
# Convert the numpy array to a base64 encoded image
|