rayli commited on
Commit
db821ff
·
verified ·
1 Parent(s): 9a42013

Fix example preview image route

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -4957,7 +4957,7 @@ def _example_mesh_grid_html(examples: list[dict[str, str]]) -> str:
4957
  for index, example in enumerate(examples):
4958
  preview_path = Path(example["preview_path"]).resolve()
4959
  label = html.escape(example["label"])
4960
- src = html.escape(f"/file={preview_path}")
4961
  buttons.append(
4962
  f"""
4963
  <button class="example-preview-button" type="button" data-example-index="{index}">
 
4957
  for index, example in enumerate(examples):
4958
  preview_path = Path(example["preview_path"]).resolve()
4959
  label = html.escape(example["label"])
4960
+ src = html.escape(f"/gradio_api/file={preview_path}")
4961
  buttons.append(
4962
  f"""
4963
  <button class="example-preview-button" type="button" data-example-index="{index}">