Spaces:
Runtime error
Runtime error
Commit
·
53ee11a
1
Parent(s):
ff59e9e
Update main.py
Browse files
main.py
CHANGED
@@ -129,7 +129,7 @@ def predict_next_frame(previous_frames: List[np.ndarray], previous_actions: List
|
|
129 |
action_descriptions.append("right_click")
|
130 |
|
131 |
prompt = " ".join(action_descriptions[-8:])
|
132 |
-
prompt = ''
|
133 |
#prompt = "1~1 0~0 0~0 0~0 0~0 0~0 0~0 0~0"
|
134 |
print(prompt)
|
135 |
|
@@ -176,7 +176,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
176 |
# Store the actions
|
177 |
if DEBUG:
|
178 |
position = positions[0]
|
179 |
-
positions = positions[1:]
|
180 |
mouse_position = position.split('~')
|
181 |
mouse_position = [int(item) for item in mouse_position]
|
182 |
|
@@ -189,7 +189,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
189 |
next_frame, next_frame_append = predict_next_frame(previous_frames, previous_actions)
|
190 |
# Load and append the corresponding ground truth image instead of model output
|
191 |
img = Image.open(f"image_{len(previous_frames)%7}.png")
|
192 |
-
previous_frames.append(np.array(img))
|
193 |
|
194 |
# Convert the numpy array to a base64 encoded image
|
195 |
img = Image.fromarray(next_frame)
|
|
|
129 |
action_descriptions.append("right_click")
|
130 |
|
131 |
prompt = " ".join(action_descriptions[-8:])
|
132 |
+
#prompt = ''
|
133 |
#prompt = "1~1 0~0 0~0 0~0 0~0 0~0 0~0 0~0"
|
134 |
print(prompt)
|
135 |
|
|
|
176 |
# Store the actions
|
177 |
if DEBUG:
|
178 |
position = positions[0]
|
179 |
+
#positions = positions[1:]
|
180 |
mouse_position = position.split('~')
|
181 |
mouse_position = [int(item) for item in mouse_position]
|
182 |
|
|
|
189 |
next_frame, next_frame_append = predict_next_frame(previous_frames, previous_actions)
|
190 |
# Load and append the corresponding ground truth image instead of model output
|
191 |
img = Image.open(f"image_{len(previous_frames)%7}.png")
|
192 |
+
#previous_frames.append(np.array(img))
|
193 |
|
194 |
# Convert the numpy array to a base64 encoded image
|
195 |
img = Image.fromarray(next_frame)
|