Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
c144d28
1
Parent(s):
6278d3d
main.py
CHANGED
|
@@ -186,7 +186,9 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
| 186 |
|
| 187 |
# Predict the next frame based on the previous frames and actions
|
| 188 |
next_frame, next_frame_append = predict_next_frame(previous_frames, previous_actions)
|
| 189 |
-
|
|
|
|
|
|
|
| 190 |
|
| 191 |
# Convert the numpy array to a base64 encoded image
|
| 192 |
img = Image.fromarray(next_frame)
|
|
|
|
| 186 |
|
| 187 |
# Predict the next frame based on the previous frames and actions
|
| 188 |
next_frame, next_frame_append = predict_next_frame(previous_frames, previous_actions)
|
| 189 |
+
# Load and append the corresponding ground truth image instead of model output
|
| 190 |
+
img = Image.open(f"image_{len(previous_frames)%7}.png")
|
| 191 |
+
previous_frames.append(np.array(img))
|
| 192 |
|
| 193 |
# Convert the numpy array to a base64 encoded image
|
| 194 |
img = Image.fromarray(next_frame)
|