zachwormgoor@gmail.com commited on
Commit
a2c132a
1 Parent(s): 7ce9ab5

troubleshooting

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -3,7 +3,20 @@
3
 
4
 
5
 
6
- __all__ = ['learn', 'categories', 'classify', 'image', 'label', 'examples', 'intf']
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
 
9
  from fastai.vision.all import *
 
3
 
4
 
5
 
6
+ __all__ = ['install', 'learn', 'categories', 'classify', 'image', 'label', 'examples', 'intf']
7
+
8
+
9
+
10
+ # Kept getting "No module named 'fastai'" from huggingface..workaround:
11
+ # https://stackoverflow.com/a/50255019
12
+ import subprocess
13
+ import sys
14
+
15
+ def install(package):
16
+ subprocess.check_call([sys.executable, "-m", "pip", "install", package])
17
+
18
+ install("fastai")
19
+
20
 
21
 
22
  from fastai.vision.all import *