Omnibus commited on
Commit
9a02f65
1 Parent(s): d466f98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -24,8 +24,12 @@ def image_classifier0(image):
24
  labels = ["Real", "AI"]
25
  outputs = pipe0(image)
26
  results = {}
 
27
  for idx,result in enumerate(outputs):
28
- results[labels[idx]] = outputs[idx]['score']
 
 
 
29
  return results
30
  def image_classifier1(image):
31
  outputs = pipe1(image)
 
24
  labels = ["Real", "AI"]
25
  outputs = pipe0(image)
26
  results = {}
27
+ result_test={}
28
  for idx,result in enumerate(outputs):
29
+ result_test[labels[idx]] = outputs[idx]['score']
30
+ print (result_test)
31
+ for result in outputs:
32
+ results[result['label']] = result['score']
33
  return results
34
  def image_classifier1(image):
35
  outputs = pipe1(image)