Spaces:
Runtime error
Runtime error
Jessica Walkenhorst
commited on
Commit
•
827bdd4
1
Parent(s):
67620b6
Update app text
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: 🪞🦢
|
4 |
colorFrom: purple
|
5 |
colorTo: blue
|
|
|
1 |
---
|
2 |
+
title: Magic Mirror
|
3 |
emoji: 🪞🦢
|
4 |
colorFrom: purple
|
5 |
colorTo: blue
|
app.py
CHANGED
@@ -11,12 +11,12 @@ def classify_image(image):
|
|
11 |
_, _, probs = learn.predict(image)
|
12 |
return dict(zip(categories, map(float, probs)))
|
13 |
|
14 |
-
title = 'Mirror,
|
15 |
-
description = """Hans Christian Andersen's tale of the ugly duckling tells us about the sad youth of a cygnet which is accidentally brought up in a family of ducks and is ostrized on the account of it being different. But what if the cygnet had a magic mirror to tell it that it
|
16 |
|
17 |
examples = ['duckling.jpg', 'cygnet.jpg', 'sunflower.jpg', 'whiteclouds.jpg', 'yellowclouds.jpg']
|
18 |
|
19 |
-
article = 'This model was build using a resnet-18 architecture
|
20 |
|
21 |
app = gr.Interface(fn=classify_image,
|
22 |
inputs=gr.components.Image(),
|
|
|
11 |
_, _, probs = learn.predict(image)
|
12 |
return dict(zip(categories, map(float, probs)))
|
13 |
|
14 |
+
title = 'Mirror, Mirror on the Wall, am I a Duckling or a Cygnet after all?'
|
15 |
+
description = """Hans Christian Andersen's tale of the ugly duckling tells us about the sad youth of a cygnet which is accidentally brought up in a family of ducks and is ostrized on the account of it being different. But what if the cygnet had had a magic mirror to tell it that it had been a young swan all along? Machine learning to the rescue!"""
|
16 |
|
17 |
examples = ['duckling.jpg', 'cygnet.jpg', 'sunflower.jpg', 'whiteclouds.jpg', 'yellowclouds.jpg']
|
18 |
|
19 |
+
article = 'This model was build using a resnet-18 architecture with weights pretrained on the ImageNet data set and fine-tuned using about 80 images of ducklings and cygnets each.\nNote that it is binary classifier and can therefore only output cygnet or duckling, "other" is not an option. As a fun exercise, I included some non-waterfowl pictures in the example. Can you guess what the model will classify them as?\nOn a final note, whilst this classifier claims to be able to detect ducklings, it really only detects mallard ducklings (aka the yellow ones) and has a hard time recognizing ducklings of other species. To see this in action, compare its performance for a mallard duckling with its performance when given the image of a black cayuga duckling for example.'
|
20 |
|
21 |
app = gr.Interface(fn=classify_image,
|
22 |
inputs=gr.components.Image(),
|