Spaces:
Runtime error
Runtime error
Phuong Anh
commited on
Commit
•
2be164b
1
Parent(s):
2ca6de4
require
Browse files- app.py +2 -0
- requirements.txt +5 -4
app.py
CHANGED
@@ -3,6 +3,8 @@ import cv2
|
|
3 |
import numpy as np
|
4 |
from anomalib.deploy import OpenVINOInferencer
|
5 |
from huggingface_hub import hf_hub_download
|
|
|
|
|
6 |
|
7 |
# Load the model
|
8 |
model_path = hf_hub_download(repo_id="suidinpa/bottle-anomaly-detection", filename="model.bin")
|
|
|
3 |
import numpy as np
|
4 |
from anomalib.deploy import OpenVINOInferencer
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
+
from anomalib import TaskType
|
7 |
+
from PIL import Image
|
8 |
|
9 |
# Load the model
|
10 |
model_path = hf_hub_download(repo_id="suidinpa/bottle-anomaly-detection", filename="model.bin")
|
requirements.txt
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
gradio==3.30.0
|
2 |
-
torch==
|
|
|
3 |
opencv-python-headless==4.7.0.72 # OpenCV for image processing (headless for better compatibility with Hugging Face)
|
4 |
numpy==1.23.0
|
5 |
-
anomalib==
|
6 |
huggingface-hub==0.14.1 # For model uploading and interaction with Hugging Face
|
7 |
openvino==2022.3.0 # OpenVINO for model inference
|
8 |
Pillow==9.2.0 # PIL for image manipulation
|
9 |
matplotlib==3.5.3 # For plotting, if needed
|
10 |
-
gdown==
|
11 |
-
loguru==0.
|
|
|
1 |
gradio==3.30.0
|
2 |
+
torch==2.5.1
|
3 |
+
torchvision==0.20.1
|
4 |
opencv-python-headless==4.7.0.72 # OpenCV for image processing (headless for better compatibility with Hugging Face)
|
5 |
numpy==1.23.0
|
6 |
+
anomalib==1.2.0 # For anomaly detection
|
7 |
huggingface-hub==0.14.1 # For model uploading and interaction with Hugging Face
|
8 |
openvino==2022.3.0 # OpenVINO for model inference
|
9 |
Pillow==9.2.0 # PIL for image manipulation
|
10 |
matplotlib==3.5.3 # For plotting, if needed
|
11 |
+
gdown==5.2.0 # For downloading from Google Drive (if necessary)
|
12 |
+
loguru==0.7.2 # For logging (optional)
|