Omnibus commited on
Commit
f62c5a9
1 Parent(s): 5558d7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -8,6 +8,14 @@ import urllib.request
8
  import uuid
9
  uid=uuid.uuid4()
10
 
 
 
 
 
 
 
 
 
11
 
12
 
13
  def softmax(vector):
 
8
  import uuid
9
  uid=uuid.uuid4()
10
 
11
+ pipe = pipeline("image-classification", "umm-maybe/AI-image-detector")
12
+
13
+ def image_classifier(image):
14
+ outputs = pipe(image)
15
+ results = {}
16
+ for result in outputs:
17
+ results[result['label']] = result['score']
18
+ return results
19
 
20
 
21
  def softmax(vector):