Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,10 +11,15 @@ from roboflow import Roboflow
|
|
| 11 |
from gradio_client import Client
|
| 12 |
import gradio as gr
|
| 13 |
|
| 14 |
-
|
| 15 |
-
#
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
# -------------------------------------------------------------------------
|
| 20 |
# Logging configuration
|
|
|
|
| 11 |
from gradio_client import Client
|
| 12 |
import gradio as gr
|
| 13 |
|
| 14 |
+
|
| 15 |
+
# --- Safely clear Gradio client cache (for older/newer versions) ---
|
| 16 |
+
try:
|
| 17 |
+
cache_dir = os.path.expanduser("~/.cache/gradio")
|
| 18 |
+
if os.path.exists(cache_dir):
|
| 19 |
+
shutil.rmtree(cache_dir)
|
| 20 |
+
print("🧹 Cleared Gradio client cache manually.")
|
| 21 |
+
except Exception as e:
|
| 22 |
+
print(f"Warning: Could not clear Gradio cache ({e})")
|
| 23 |
|
| 24 |
# -------------------------------------------------------------------------
|
| 25 |
# Logging configuration
|