ducngg commited on
Commit
c72b38c
β€’
1 Parent(s): acb5516

Update model v3: 10 classes

Browse files
app.py CHANGED
@@ -11,7 +11,7 @@ def handle_classify(image=None):
11
  image (gr.inputs.Image, optional): Input image to detect objects on. Defaults to None.
12
  """
13
 
14
- model_path = "racist2.0.pt"
15
  model = YOLO(model_path)
16
 
17
  results = model(image)
@@ -23,7 +23,7 @@ def handle_classify(image=None):
23
 
24
  print(top5)
25
 
26
- return "\n".join(["\t".join(row) for row in top5])
27
 
28
 
29
  inputs = [
@@ -33,7 +33,7 @@ inputs = [
33
 
34
  outputs = gr.Textbox()
35
 
36
- title = "Racist model v2"
37
 
38
  SAMPLE_DIR = 'samples'
39
  examples = [os.path.join(SAMPLE_DIR, path) for path in os.listdir(SAMPLE_DIR)]
 
11
  image (gr.inputs.Image, optional): Input image to detect objects on. Defaults to None.
12
  """
13
 
14
+ model_path = "racistv3.pt"
15
  model = YOLO(model_path)
16
 
17
  results = model(image)
 
23
 
24
  print(top5)
25
 
26
+ return "\n".join([f'{row[0]:<16}:{row[1]:>8.2f}' for row in top5])
27
 
28
 
29
  inputs = [
 
33
 
34
  outputs = gr.Textbox()
35
 
36
+ title = "Racist model v3"
37
 
38
  SAMPLE_DIR = 'samples'
39
  examples = [os.path.join(SAMPLE_DIR, path) for path in os.listdir(SAMPLE_DIR)]
racist2.0.pt β†’ racistv3.pt RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6c59a98befcac1c90e9500f01516a88ae728eb3cea2a0e13c20d1f42d30efd41
3
- size 112503345
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8d70d53a4961202f05e3fa697ea42a54bd1592a8770a27cfc0ad4addee3da12
3
+ size 112509041
samples/sample6.jpg ADDED
samples/sample7.jpeg ADDED
samples/sample8.jpg ADDED