Spaces:
Runtime error
Runtime error
Amanda Sarubbi
commited on
Commit
·
12af81f
1
Parent(s):
8fe7789
hi
Browse files
app.py
CHANGED
@@ -33,15 +33,15 @@ char = {"Men": "020101-020139", "Women": "020301-020328", "Children": "020501-02
|
|
33 |
# Function to predict outputs
|
34 |
def predict(img, model_name):
|
35 |
if (model_name == 'Geometric Figures & Solids'):
|
36 |
-
geo_learn = from_pretrained_fastai('amandasarubbi/geo_model'
|
37 |
pred = geo_learn.predict(img)[0]
|
38 |
labels = geo
|
39 |
elif (model_name == 'Scenery, Natural Phenomena'):
|
40 |
-
landscape_learn = from_pretrained_fastai('amandasarubbi/landscape_model'
|
41 |
pred = landscape_learn.predict(img)[0]
|
42 |
labels = scen
|
43 |
elif (model_name == 'Human & Supernatural Beings'):
|
44 |
-
human_learn = from_pretrained_fastai('amandasarubbi/human_model'
|
45 |
pred = human_learn.predict(img)[0]
|
46 |
labels = char
|
47 |
|
|
|
33 |
# Function to predict outputs
|
34 |
def predict(img, model_name):
|
35 |
if (model_name == 'Geometric Figures & Solids'):
|
36 |
+
geo_learn = from_pretrained_fastai('amandasarubbi/geo_model')
|
37 |
pred = geo_learn.predict(img)[0]
|
38 |
labels = geo
|
39 |
elif (model_name == 'Scenery, Natural Phenomena'):
|
40 |
+
landscape_learn = from_pretrained_fastai('amandasarubbi/landscape_model')
|
41 |
pred = landscape_learn.predict(img)[0]
|
42 |
labels = scen
|
43 |
elif (model_name == 'Human & Supernatural Beings'):
|
44 |
+
human_learn = from_pretrained_fastai('amandasarubbi/human_model')
|
45 |
pred = human_learn.predict(img)[0]
|
46 |
labels = char
|
47 |
|