hermanshid commited on
Commit
2a8dc59
·
1 Parent(s): e84b1ec
.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: pink
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
- models_ids = ['hermanshid/yolo-aksara-jawa']
8
 
9
- current_model_id = models_ids[-1]
10
- model = yolov5.load(current_model_id)
11
 
12
- examples = [['test_images/hanacaraka.jpg', 0.25, 'hermanshid/yolo-aksara-jawa']]
13
 
14
 
15
- def predict(image, threshold=0.25, model_id=None):
16
- global current_model_id
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

  • SHA256: 4de7ca013b44c0d4201a02b83ffea2e455757eb3cd389d3595166d31c0ccdbdb
  • Pointer size: 131 Bytes
  • Size of remote file: 226 kB
test_images/hanacaraka.jpg DELETED
Binary file (226 kB)