Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,9 +44,6 @@ def inference(input_image):
|
|
44 |
probabilities = torch.nn.functional.softmax(output[0], dim=0)
|
45 |
|
46 |
# Read the categories
|
47 |
-
with open("artist_classes.txt", "r") as f:
|
48 |
-
categories = [s.strip() for s in f.readlines()]
|
49 |
-
|
50 |
categories = {
|
51 |
0:"vanGogh",
|
52 |
1:"Monet",
|
@@ -69,7 +66,7 @@ outputs = gr.Label(type="confidences",num_top_classes=5,label='Prediction')
|
|
69 |
title = "Artist Classifier"
|
70 |
description = "The classifier is a demo classifier to predict the painter using fine-tuned EfficientNet. It allows you to identify the creator of a painting among Van Gogh, Claude Monet, Leonardo da Vinci, Rembrandt, Pablo Picasso, and Salvador Dali. Just upload the image to the left blank box and click the Submit button. A list of confidence will be displayed. Following the link below to find a related work that helps to create your own paintings following the style of painters"
|
71 |
|
72 |
-
article = "<p style='text-align:
|
73 |
|
74 |
#examples = [
|
75 |
# ['dog.jpg']
|
|
|
44 |
probabilities = torch.nn.functional.softmax(output[0], dim=0)
|
45 |
|
46 |
# Read the categories
|
|
|
|
|
|
|
47 |
categories = {
|
48 |
0:"vanGogh",
|
49 |
1:"Monet",
|
|
|
66 |
title = "Artist Classifier"
|
67 |
description = "The classifier is a demo classifier to predict the painter using fine-tuned EfficientNet. It allows you to identify the creator of a painting among Van Gogh, Claude Monet, Leonardo da Vinci, Rembrandt, Pablo Picasso, and Salvador Dali. Just upload the image to the left blank box and click the Submit button. A list of confidence will be displayed. Following the link below to find a related work that helps to create your own paintings following the style of painters"
|
68 |
|
69 |
+
article = "<p style='text-align: left'><a href='https://huggingface.co/spaces/breynolds1247/StarryNight_StyleTransfer'>Style Transfer: Create your own stylish paintings </a></p>"
|
70 |
|
71 |
#examples = [
|
72 |
# ['dog.jpg']
|