Update app.py
Browse files
app.py
CHANGED
@@ -10,25 +10,6 @@ import subprocess
|
|
10 |
from glob import glob
|
11 |
import requests
|
12 |
|
13 |
-
|
14 |
-
def install_torch_scatter():
|
15 |
-
try:
|
16 |
-
subprocess.check_call([
|
17 |
-
sys.executable,
|
18 |
-
"-m",
|
19 |
-
"pip",
|
20 |
-
"install",
|
21 |
-
"--no-build-isolation",
|
22 |
-
"torch-scatter==2.1.2"
|
23 |
-
])
|
24 |
-
print("torch-scatter installed successfully.")
|
25 |
-
except subprocess.CalledProcessError as e:
|
26 |
-
print("Error occurred while installing torch-scatter:", e)
|
27 |
-
sys.exit(1)
|
28 |
-
|
29 |
-
# Call the function during your app's initialization
|
30 |
-
install_torch_scatter()
|
31 |
-
|
32 |
def remove_background(input_url):
|
33 |
# Create a temporary folder for downloaded and processed images
|
34 |
temp_dir = tempfile.mkdtemp()
|
|
|
10 |
from glob import glob
|
11 |
import requests
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
def remove_background(input_url):
|
14 |
# Create a temporary folder for downloaded and processed images
|
15 |
temp_dir = tempfile.mkdtemp()
|