zachwormgoor@gmail.com commited on
Commit
66b0b77
β€’
1 Parent(s): 39d70e1

Adding timm

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -1,6 +1,7 @@
1
 
2
 
3
 
 
4
  # Kept getting "No module named 'fastai'" from huggingface..workaround:
5
  # https://stackoverflow.com/a/50255019
6
  import subprocess
@@ -11,7 +12,15 @@ def install(package):
11
 
12
  install("fastai")
13
 
 
 
 
 
 
 
 
14
  from fastai.vision.all import *
 
15
 
16
 
17
  learn_resnet = load_learner('model - resnet18.pkl')
 
1
 
2
 
3
 
4
+
5
  # Kept getting "No module named 'fastai'" from huggingface..workaround:
6
  # https://stackoverflow.com/a/50255019
7
  import subprocess
 
12
 
13
  install("fastai")
14
 
15
+ # Errors from within libraries suggest that importing timm must be done before importing fast.ai, something like this:
16
+ # https://forums.fast.ai/t/nameerror-name-timm-is-not-defined/96158
17
+ #!pip install -Uqq fastai timm
18
+ #!pip install timm
19
+ install("timm")
20
+
21
+
22
  from fastai.vision.all import *
23
+ import timm
24
 
25
 
26
  learn_resnet = load_learner('model - resnet18.pkl')