Spaces:
Running
Running
fix: empty gr.State + api_name=False (workaround gradio_client schema bug)
Browse files
app.py
CHANGED
|
@@ -214,7 +214,7 @@ with gr.Blocks(title="MBench-V Annotation", theme=gr.themes.Soft()) as demo:
|
|
| 214 |
"""
|
| 215 |
)
|
| 216 |
|
| 217 |
-
state = gr.State(
|
| 218 |
|
| 219 |
with gr.Row():
|
| 220 |
annotator_in = gr.Textbox(
|
|
@@ -247,21 +247,25 @@ with gr.Blocks(title="MBench-V Annotation", theme=gr.themes.Soft()) as demo:
|
|
| 247 |
start_session,
|
| 248 |
inputs=[annotator_in, state],
|
| 249 |
outputs=[state, video, meta_md, prompt_tb, status_md],
|
|
|
|
| 250 |
)
|
| 251 |
annotator_in.submit(
|
| 252 |
start_session,
|
| 253 |
inputs=[annotator_in, state],
|
| 254 |
outputs=[state, video, meta_md, prompt_tb, status_md],
|
|
|
|
| 255 |
)
|
| 256 |
submit_btn.click(
|
| 257 |
submit_and_next,
|
| 258 |
inputs=[state, score, note],
|
| 259 |
outputs=[state, video, meta_md, prompt_tb, score, note, status_md],
|
|
|
|
| 260 |
)
|
| 261 |
skip_btn.click(
|
| 262 |
skip_and_next,
|
| 263 |
inputs=[state],
|
| 264 |
outputs=[state, video, meta_md, prompt_tb, score, note, status_md],
|
|
|
|
| 265 |
)
|
| 266 |
|
| 267 |
|
|
|
|
| 214 |
"""
|
| 215 |
)
|
| 216 |
|
| 217 |
+
state = gr.State()
|
| 218 |
|
| 219 |
with gr.Row():
|
| 220 |
annotator_in = gr.Textbox(
|
|
|
|
| 247 |
start_session,
|
| 248 |
inputs=[annotator_in, state],
|
| 249 |
outputs=[state, video, meta_md, prompt_tb, status_md],
|
| 250 |
+
api_name=False,
|
| 251 |
)
|
| 252 |
annotator_in.submit(
|
| 253 |
start_session,
|
| 254 |
inputs=[annotator_in, state],
|
| 255 |
outputs=[state, video, meta_md, prompt_tb, status_md],
|
| 256 |
+
api_name=False,
|
| 257 |
)
|
| 258 |
submit_btn.click(
|
| 259 |
submit_and_next,
|
| 260 |
inputs=[state, score, note],
|
| 261 |
outputs=[state, video, meta_md, prompt_tb, score, note, status_md],
|
| 262 |
+
api_name=False,
|
| 263 |
)
|
| 264 |
skip_btn.click(
|
| 265 |
skip_and_next,
|
| 266 |
inputs=[state],
|
| 267 |
outputs=[state, video, meta_md, prompt_tb, score, note, status_md],
|
| 268 |
+
api_name=False,
|
| 269 |
)
|
| 270 |
|
| 271 |
|