Spaces:
Runtime error
Runtime error
hugo scheithauer
commited on
Commit
·
aae0967
1
Parent(s):
d243cbc
downloading model from the hub + new examples
Browse files
app.py
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
-
import
|
3 |
from PIL import Image
|
|
|
4 |
|
5 |
# Model
|
6 |
-
|
|
|
|
|
7 |
|
8 |
def predict(im, threshold=0.50):
|
9 |
# g = (size / max(im.size)) # gain
|
|
|
1 |
import gradio as gr
|
2 |
+
from huggingface_hub import hf_hub_download
|
3 |
from PIL import Image
|
4 |
+
import yolov5
|
5 |
|
6 |
# Model
|
7 |
+
model_file = hf_hub_download(repo_id="HugoSchtr/yolov5_datacat", filename="best.pt")
|
8 |
+
|
9 |
+
model = yolov5.load(model_file)
|
10 |
|
11 |
def predict(im, threshold=0.50):
|
12 |
# g = (size / max(im.size)) # gain
|
img_examples/12148-bpt6k1240127r.pdf_page_37.png
ADDED
![]() |
Git LFS Details
|
img_examples/12148-bpt6k1240127r.pdf_page_83.png
ADDED
![]() |
Git LFS Details
|
img_examples/12148-bpt6k1240127r_BpE9Wd0.pdf_page_74.png
ADDED
![]() |
Git LFS Details
|