Spaces:
Sleeping
Sleeping
Download app.py from OthmaneW/Hardware-Scanner: direct link, hf CLI and curl.
- Browser
- Download file 542 Bytes
-
https://huggingface.co/spaces/OthmaneW/Hardware-Scanner/resolve/main/app.py
- Command line
-
hf download hf://spaces/OthmaneW/Hardware-Scanner/app.py
-
curl -L -o app.py https://huggingface.co/spaces/OthmaneW/Hardware-Scanner/resolve/main/app.py
542 Bytes
| import gradio as gr | |
| from ultralytics import YOLO | |
| import cv2 | |
| import numpy as np | |
| model = YOLO("best.pt") | |
| def detect_objects(image): | |
| results = model.predict(source=image, conf=0.25) | |
| result_image = results[0].plot() | |
| return result_image | |
| demo = gr.Interface( | |
| fn=detect_objects, | |
| inputs=gr.Image(type="numpy"), | |
| outputs=gr.Image(type="numpy"), | |
| title="Hardware Scanner AI", | |
| description="Upload une photo de ton PC Gamer. L'IA va détecter le GPU, la RAM, et le ventirad !", | |
| ) | |
| demo.launch() |