Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
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)
|