Spaces:
Sleeping
Sleeping
Commit
·
2a8dc59
1
Parent(s):
e84b1ec
fix title
Browse files- .gitattributes +5 -0
- README.md +1 -1
- app.py +5 -10
- test_images/example1.jpg +3 -0
- test_images/hanacaraka.jpg +0 -0
.gitattributes
CHANGED
@@ -33,3 +33,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
test_images/ filter=lfs diff=lfs merge=lfs -text
|
37 |
+
test_images/example2.jpg filter=lfs diff=lfs merge=lfs -text
|
38 |
+
test_images/example3.jpg filter=lfs diff=lfs merge=lfs -text
|
39 |
+
test_images/example1.jpg filter=lfs diff=lfs merge=lfs -text
|
40 |
+
install filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
---
|
2 |
title: Aksara Jawa Space
|
3 |
emoji: ⚡
|
4 |
-
colorFrom:
|
5 |
colorTo: green
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.44.4
|
|
|
1 |
---
|
2 |
title: Aksara Jawa Space
|
3 |
emoji: ⚡
|
4 |
+
colorFrom: blue
|
5 |
colorTo: green
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.44.4
|
app.py
CHANGED
@@ -4,20 +4,16 @@ import yolov5
|
|
4 |
from PIL import Image
|
5 |
|
6 |
app_title = "Aksara Jawa Object Detection"
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
model = yolov5.load(current_model_id)
|
11 |
|
12 |
-
examples = [['test_images/
|
13 |
|
14 |
|
15 |
-
def predict(image, threshold=0.25
|
16 |
-
global
|
17 |
global model
|
18 |
-
if model_id != current_model_id:
|
19 |
-
model = yolov5.load(model_id)
|
20 |
-
current_model_id = model_id
|
21 |
|
22 |
input_size = 640
|
23 |
|
@@ -35,7 +31,6 @@ gr.Interface(
|
|
35 |
inputs=[
|
36 |
gr.Image(type="pil"),
|
37 |
gr.Slider(maximum=1, step=0.01, value=0.25),
|
38 |
-
gr.Dropdown(models_ids, value=models_ids[-1]),
|
39 |
],
|
40 |
outputs=gr.Image(type="pil"),
|
41 |
examples=examples,
|
|
|
4 |
from PIL import Image
|
5 |
|
6 |
app_title = "Aksara Jawa Object Detection"
|
7 |
+
models_id = 'hermanshid/yolo-aksara-jawa'
|
8 |
|
9 |
+
model = yolov5.load(models_id)
|
|
|
10 |
|
11 |
+
examples = [['test_images/example1.jpg', 0.9, ]]
|
12 |
|
13 |
|
14 |
+
def predict(image, threshold=0.25):
|
15 |
+
global models_id
|
16 |
global model
|
|
|
|
|
|
|
17 |
|
18 |
input_size = 640
|
19 |
|
|
|
31 |
inputs=[
|
32 |
gr.Image(type="pil"),
|
33 |
gr.Slider(maximum=1, step=0.01, value=0.25),
|
|
|
34 |
],
|
35 |
outputs=gr.Image(type="pil"),
|
36 |
examples=examples,
|
test_images/example1.jpg
ADDED
![]() |
Git LFS Details
|
test_images/hanacaraka.jpg
DELETED
Binary file (226 kB)
|
|