StoneSeller commited on
Commit
a0b7851
·
verified ·
1 Parent(s): 676ea7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -10,7 +10,13 @@ except ImportError:
10
  "torchvision==0.15.2+cpu",
11
  "-f", "https://download.pytorch.org/whl/torch_stable.html"])
12
 
 
 
 
 
 
13
  import torch
 
14
  import torch.nn as nn
15
  import torchvision.transforms as transforms
16
  from PIL import Image
 
10
  "torchvision==0.15.2+cpu",
11
  "-f", "https://download.pytorch.org/whl/torch_stable.html"])
12
 
13
+ try:
14
+ import numpy as np
15
+ except ImportError:
16
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "numpy<2"])
17
+
18
  import torch
19
+ import numpy
20
  import torch.nn as nn
21
  import torchvision.transforms as transforms
22
  from PIL import Image