mik170802 commited on
Commit
76af1a5
·
1 Parent(s): 88b5236

Aggiunto progetto su Hf

Browse files
Files changed (4) hide show
  1. README.md +11 -0
  2. app.py +9 -0
  3. requirements.txt +1 -1
  4. scripts/download_checkpoints.py +1 -1
README.md CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  # MVTec Anomaly Benchmark
2
 
3
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
 
1
+ ---
2
+ title: MVTec Anomaly Benchmark
3
+ emoji: 🔍
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: 6.3.0
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ ---
12
  # MVTec Anomaly Benchmark
13
 
14
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
app.py CHANGED
@@ -14,7 +14,16 @@ Run with: python app.py
14
  from gradio_ui import create_app, launch_app
15
 
16
 
 
17
  if __name__ == "__main__":
 
 
 
 
 
 
 
 
18
  launch_app(
19
  server_name="0.0.0.0", # Allow external access
20
  server_port=7860,
 
14
  from gradio_ui import create_app, launch_app
15
 
16
 
17
+
18
  if __name__ == "__main__":
19
+ # Check for checkpoints and download if missing
20
+ import os
21
+ import subprocess
22
+ import sys
23
+
24
+ print("🔄 Checking for model checkpoints...")
25
+ subprocess.run([sys.executable, "scripts/download_checkpoints.py"], check=False)
26
+
27
  launch_app(
28
  server_name="0.0.0.0", # Allow external access
29
  server_port=7860,
requirements.txt CHANGED
@@ -17,7 +17,7 @@ Pillow>=9.5.0
17
  PyYAML>=6.0
18
 
19
  # Web UI
20
- gradio>=4.0.0
21
 
22
  # HuggingFace Hub (for checkpoint download)
23
  huggingface_hub>=0.20.0
 
17
  PyYAML>=6.0
18
 
19
  # Web UI
20
+ gradio>=6.3.0
21
 
22
  # HuggingFace Hub (for checkpoint download)
23
  huggingface_hub>=0.20.0
scripts/download_checkpoints.py CHANGED
@@ -30,7 +30,7 @@ from core.config import MVTEC_CATEGORIES, DIR_RESULTS, get_available_models
30
  # =============================================================================
31
 
32
  # TODO: Replace with your HuggingFace Hub repository
33
- HF_REPO_ID = "YOUR_USERNAME/mvtec-anomaly-checkpoints"
34
 
35
  # Mapping from model name to result directory name
36
  MODEL_TO_DIRNAME = {
 
30
  # =============================================================================
31
 
32
  # TODO: Replace with your HuggingFace Hub repository
33
+ HF_REPO_ID = "micguida1/mvtec-anomaly-checkpoints"
34
 
35
  # Mapping from model name to result directory name
36
  MODEL_TO_DIRNAME = {