zukhriddinai commited on
Commit
d24bdd7
·
verified ·
1 Parent(s): 67f471a

Deploy public authenticated AutoML gateway

Browse files
Files changed (1) hide show
  1. gateway_app.py +15 -1
gateway_app.py CHANGED
@@ -1873,7 +1873,21 @@ def predict_remote_ui_staged(*args, **kwargs):
1873
 
1874
  def _staged_visual_update(state: Any, index: int) -> Any:
1875
  updates = _staged_visual_updates(state)
1876
- return updates[index]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1877
 
1878
 
1879
  def _staged_visual_warning(state: Any) -> Any:
 
1873
 
1874
  def _staged_visual_update(state: Any, index: int) -> Any:
1875
  updates = _staged_visual_updates(state)
1876
+ update = updates[index]
1877
+ if (
1878
+ index > 0
1879
+ and isinstance(update, Mapping)
1880
+ and update.get("visible") is False
1881
+ and update.get("value") is None
1882
+ ):
1883
+ # Gradio 6.17 can abort a chained event after applying an explicit
1884
+ # hidden/empty Image update (the browser reports "Method not
1885
+ # implemented"). That prevents a later task-relevant image, such as
1886
+ # an instance mask overlay, from rendering. A skip is the honest
1887
+ # no-op for irrelevant image slots; model/package changes already run
1888
+ # the canonical reset handler that clears prior visual values.
1889
+ return gr.skip()
1890
+ return update
1891
 
1892
 
1893
  def _staged_visual_warning(state: Any) -> Any: