amoghrrao commited on
Commit
7ce2b4d
·
verified ·
1 Parent(s): 2e97ac1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  import torch
2
  import numpy as np
3
  from PIL import Image, ImageFilter
@@ -9,6 +12,8 @@ from transformers import (
9
  AutoModelForDepthEstimation,
10
  )
11
 
 
 
12
  def load_segmentation_model():
13
  model_name = "ZhengPeng7/BiRefNet"
14
  model = AutoModelForImageSegmentation.from_pretrained(model_name, trust_remote_code=True)
 
1
+ import subprocess
2
+ subprocess.run(["pip", "install", "-r", "requirements.txt"])
3
+
4
  import torch
5
  import numpy as np
6
  from PIL import Image, ImageFilter
 
12
  AutoModelForDepthEstimation,
13
  )
14
 
15
+
16
+
17
  def load_segmentation_model():
18
  model_name = "ZhengPeng7/BiRefNet"
19
  model = AutoModelForImageSegmentation.from_pretrained(model_name, trust_remote_code=True)