Spaces:
Runtime error
Runtime error
ttcielott
commited on
Commit
·
0e0f6b5
1
Parent(s):
8b2dc50
fix error
Browse files
app.py
CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
|
|
2 |
from gradio.components import Image, Textbox
|
3 |
from fastai.vision.all import *
|
4 |
|
5 |
-
learn = load_learner('export_ver1.pkl')
|
6 |
|
7 |
def get_headcount(filepath):
|
8 |
filepath = str(filepath)
|
@@ -10,6 +9,9 @@ def get_headcount(filepath):
|
|
10 |
|
11 |
return df[df['Name'] == filename]['HeadCount'].values[0]
|
12 |
|
|
|
|
|
|
|
13 |
def predict(img):
|
14 |
img = PILImage.create(img)
|
15 |
op = learn.predict(img)
|
|
|
2 |
from gradio.components import Image, Textbox
|
3 |
from fastai.vision.all import *
|
4 |
|
|
|
5 |
|
6 |
def get_headcount(filepath):
|
7 |
filepath = str(filepath)
|
|
|
9 |
|
10 |
return df[df['Name'] == filename]['HeadCount'].values[0]
|
11 |
|
12 |
+
|
13 |
+
learn = load_learner('export_ver1.pkl')
|
14 |
+
|
15 |
def predict(img):
|
16 |
img = PILImage.create(img)
|
17 |
op = learn.predict(img)
|