Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,16 +2,16 @@ import gradio as gr
|
|
2 |
from fastai.vision.all import *
|
3 |
import skimage
|
4 |
|
5 |
-
learn = load_learner('P1_model_v2.pkl')
|
6 |
-
|
7 |
-
labels = learn.dls.vocab
|
8 |
-
|
9 |
def tempfromPath(input_Path):
|
10 |
a = parent_label(input_Path)
|
11 |
#print(a)
|
12 |
b = float(df[df['Capital']==a]['Temperature (degC)'])
|
13 |
return b
|
14 |
|
|
|
|
|
|
|
|
|
15 |
def predict(img):
|
16 |
img = PILImage.create(img)
|
17 |
Temp = learn.predict(img)
|
|
|
2 |
from fastai.vision.all import *
|
3 |
import skimage
|
4 |
|
|
|
|
|
|
|
|
|
5 |
def tempfromPath(input_Path):
|
6 |
a = parent_label(input_Path)
|
7 |
#print(a)
|
8 |
b = float(df[df['Capital']==a]['Temperature (degC)'])
|
9 |
return b
|
10 |
|
11 |
+
learn = load_learner('P1_model_v2.pkl')
|
12 |
+
|
13 |
+
labels = learn.dls.vocab
|
14 |
+
|
15 |
def predict(img):
|
16 |
img = PILImage.create(img)
|
17 |
Temp = learn.predict(img)
|