Neel kamal sahu
commited on
Commit
•
19ffff6
1
Parent(s):
8d424e9
trying to add bars in output
Browse files
app.py
CHANGED
@@ -14,10 +14,9 @@ def classify_image(img):
|
|
14 |
|
15 |
# Use the model to make a prediction
|
16 |
prediction = model.predict(img)[0]
|
17 |
-
#print(prediction)
|
18 |
# Map the predicted class to a label
|
19 |
-
dic = {'SFW':
|
20 |
-
return dic
|
21 |
|
22 |
def classify_url(url):
|
23 |
# Load the image from the URL
|
|
|
14 |
|
15 |
# Use the model to make a prediction
|
16 |
prediction = model.predict(img)[0]
|
|
|
17 |
# Map the predicted class to a label
|
18 |
+
dic = {'SFW': float(prediction[1]), 'NSFW': float(prediction[0])}
|
19 |
+
return dic
|
20 |
|
21 |
def classify_url(url):
|
22 |
# Load the image from the URL
|