put examples in images dir and change to model 151
Browse files
app.py
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: ../pokemonclassifier.ipynb.
|
2 |
|
3 |
# %% auto 0
|
4 |
-
__all__ = ['modelname', '
|
5 |
'prob_threshold', 'classify_image']
|
6 |
|
7 |
# %% ../pokemonclassifier.ipynb 3
|
8 |
import pandas as pd
|
9 |
|
10 |
modelname = 'model.pkl'
|
|
|
11 |
|
12 |
pokemon_types = pd.read_csv("pokemongen1patch.csv")
|
13 |
pokemon_types_en = pokemon_types['en']
|
@@ -16,14 +17,13 @@ pokemon_types_en = pokemon_types['en']
|
|
16 |
from huggingface_hub import hf_hub_download
|
17 |
from fastai.learner import load_learner
|
18 |
|
19 |
-
learn_inf = load_learner(hf_hub_download("Okkoman/
|
20 |
-
imagespath = ''
|
21 |
|
22 |
-
# %% ../pokemonclassifier.ipynb
|
23 |
import gradio as gr
|
24 |
|
25 |
lang = 'en'
|
26 |
-
title = "# PokeFace
|
27 |
description = "## An image classifier for 1st generation pokemons (001-151)"
|
28 |
unknown = 'unknown'
|
29 |
|
@@ -32,9 +32,8 @@ prob_threshold = 0.75
|
|
32 |
from flask import request
|
33 |
if request:
|
34 |
lang = request.headers.get("Accept-Language")
|
35 |
-
print(lang)
|
36 |
if lang == 'fr':
|
37 |
-
title = "# PokeFace
|
38 |
description = "## Un classifieur d'images pour les pokemons de 1ere génération (001-151)"
|
39 |
unknown = 'inconnu'
|
40 |
|
|
|
1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: ../pokemonclassifier.ipynb.
|
2 |
|
3 |
# %% auto 0
|
4 |
+
__all__ = ['modelname', 'imagespath', 'pokemon_types', 'pokemon_types_en', 'learn_inf', 'lang', 'title', 'description', 'unknown',
|
5 |
'prob_threshold', 'classify_image']
|
6 |
|
7 |
# %% ../pokemonclassifier.ipynb 3
|
8 |
import pandas as pd
|
9 |
|
10 |
modelname = 'model.pkl'
|
11 |
+
imagespath = 'images/'
|
12 |
|
13 |
pokemon_types = pd.read_csv("pokemongen1patch.csv")
|
14 |
pokemon_types_en = pokemon_types['en']
|
|
|
17 |
from huggingface_hub import hf_hub_download
|
18 |
from fastai.learner import load_learner
|
19 |
|
20 |
+
learn_inf = load_learner(hf_hub_download("Okkoman/PokeFace151", modelname))
|
|
|
21 |
|
22 |
+
# %% ../pokemonclassifier.ipynb 30
|
23 |
import gradio as gr
|
24 |
|
25 |
lang = 'en'
|
26 |
+
title = "# PokeFace - What is this pokemon ?"
|
27 |
description = "## An image classifier for 1st generation pokemons (001-151)"
|
28 |
unknown = 'unknown'
|
29 |
|
|
|
32 |
from flask import request
|
33 |
if request:
|
34 |
lang = request.headers.get("Accept-Language")
|
|
|
35 |
if lang == 'fr':
|
36 |
+
title = "# PokeFace - Quel est ce pokemon ?"
|
37 |
description = "## Un classifieur d'images pour les pokemons de 1ere génération (001-151)"
|
38 |
unknown = 'inconnu'
|
39 |
|
bulbizarre.jpg → images/bulbizarre.jpg
RENAMED
File without changes
|
log.csv → images/log.csv
RENAMED
File without changes
|
pikachu.webp → images/pikachu.webp
RENAMED
File without changes
|
rhinocorne.webp → images/rhinocorne.webp
RENAMED
File without changes
|