Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -106,10 +106,7 @@ def load_preview(url: str):
|
|
| 106 |
except UnidentifiedImageError:
|
| 107 |
return gr.update(value=None, visible=False), gr.update(value=local, visible=True), gr.update(value="Non-image file — showing as video if playable.")
|
| 108 |
except Exception as e:
|
| 109 |
-
return gr.update(value=None, visible=False), gr.update(value=None,
|
| 110 |
-
|
| 111 |
-
```python
|
| 112 |
-
visible=False), gr.update(value=f"Preview load failed: {e}")
|
| 113 |
|
| 114 |
def _save_preview_local(url: str) -> Optional[str]:
|
| 115 |
if not url: return None
|
|
|
|
| 106 |
except UnidentifiedImageError:
|
| 107 |
return gr.update(value=None, visible=False), gr.update(value=local, visible=True), gr.update(value="Non-image file — showing as video if playable.")
|
| 108 |
except Exception as e:
|
| 109 |
+
return gr.update(value=None, visible=False), gr.update(value=None, visible=False), gr.update(value=f"Preview load failed: {e}")
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
def _save_preview_local(url: str) -> Optional[str]:
|
| 112 |
if not url: return None
|