Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,16 @@
|
|
1 |
from huggingface_hub import from_pretrained_fastai
|
2 |
import gradio as gr
|
3 |
from fastai.vision.all import *
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
|
6 |
|
7 |
# repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
|
8 |
-
repo_id = "
|
9 |
|
10 |
learner = from_pretrained_fastai(repo_id)
|
11 |
labels = learner.dls.vocab
|
|
|
1 |
from huggingface_hub import from_pretrained_fastai
|
2 |
import gradio as gr
|
3 |
from fastai.vision.all import *
|
4 |
+
try:
|
5 |
+
import toml
|
6 |
+
except ImportError:
|
7 |
+
os.system('pip install toml')
|
8 |
+
import toml
|
9 |
|
10 |
|
11 |
|
12 |
# repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
|
13 |
+
repo_id = "edgilr/intel-image-classification"
|
14 |
|
15 |
learner = from_pretrained_fastai(repo_id)
|
16 |
labels = learner.dls.vocab
|