setup zerogpu properly
Browse files
app.py
CHANGED
|
@@ -169,7 +169,7 @@ with gr.Blocks() as demo:
|
|
| 169 |
|
| 170 |
with gr.Row():
|
| 171 |
viewer = Rerun(
|
| 172 |
-
streaming=
|
| 173 |
panel_states={
|
| 174 |
"time": "collapsed",
|
| 175 |
"blueprint": "hidden",
|
|
@@ -177,29 +177,29 @@ with gr.Blocks() as demo:
|
|
| 177 |
},
|
| 178 |
)
|
| 179 |
|
| 180 |
-
# We make a new recording id, and store it in a Gradio's session state.
|
| 181 |
-
recording_id = gr.State(uuid.uuid4())
|
| 182 |
-
|
| 183 |
-
# Also store the current timeline and time of the viewer in the session state.
|
| 184 |
-
current_timeline = gr.State("")
|
| 185 |
-
current_time = gr.State(0.0)
|
| 186 |
-
|
| 187 |
-
# When registering the event listeners, we pass the `recording_id` in as input in order to create
|
| 188 |
-
# a recording stream using that id.
|
| 189 |
-
stream_blur.click(
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
)
|
| 195 |
-
viewer.selection_change(
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
)
|
| 200 |
-
viewer.time_update(track_current_time, outputs=[current_time])
|
| 201 |
-
viewer.timeline_change(track_current_timeline_and_time, outputs=[current_timeline, current_time])
|
| 202 |
|
| 203 |
|
| 204 |
if __name__ == "__main__":
|
| 205 |
-
demo.launch(
|
|
|
|
| 169 |
|
| 170 |
with gr.Row():
|
| 171 |
viewer = Rerun(
|
| 172 |
+
streaming=False,
|
| 173 |
panel_states={
|
| 174 |
"time": "collapsed",
|
| 175 |
"blueprint": "hidden",
|
|
|
|
| 177 |
},
|
| 178 |
)
|
| 179 |
|
| 180 |
+
# # We make a new recording id, and store it in a Gradio's session state.
|
| 181 |
+
# recording_id = gr.State(uuid.uuid4())
|
| 182 |
+
|
| 183 |
+
# # Also store the current timeline and time of the viewer in the session state.
|
| 184 |
+
# current_timeline = gr.State("")
|
| 185 |
+
# current_time = gr.State(0.0)
|
| 186 |
+
|
| 187 |
+
# # When registering the event listeners, we pass the `recording_id` in as input in order to create
|
| 188 |
+
# # a recording stream using that id.
|
| 189 |
+
# stream_blur.click(
|
| 190 |
+
# # Using the `viewer` as an output allows us to stream data to it by yielding bytes from the callback.
|
| 191 |
+
# streaming_repeated_blur,
|
| 192 |
+
# inputs=[recording_id, img],
|
| 193 |
+
# outputs=[viewer],
|
| 194 |
+
# )
|
| 195 |
+
# viewer.selection_change(
|
| 196 |
+
# register_keypoint,
|
| 197 |
+
# inputs=[recording_id, current_timeline, current_time],
|
| 198 |
+
# outputs=[viewer],
|
| 199 |
+
# )
|
| 200 |
+
# viewer.time_update(track_current_time, outputs=[current_time])
|
| 201 |
+
# viewer.timeline_change(track_current_timeline_and_time, outputs=[current_timeline, current_time])
|
| 202 |
|
| 203 |
|
| 204 |
if __name__ == "__main__":
|
| 205 |
+
demo.launch()
|