Spaces:
Runtime error
Runtime error
new
Browse files- app.py +2 -3
- requirements.txt +100 -0
app.py
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
-
from doctest import Example
|
2 |
import gradio as gr
|
3 |
import inpaint.infer_model as inpaint
|
4 |
import sod.infer_model as sod
|
5 |
import numpy as np
|
6 |
import torch
|
7 |
-
import os
|
8 |
# cmd = 'sh download.sh'
|
9 |
# os.system(cmd)
|
10 |
|
@@ -20,4 +19,4 @@ def sod_inpaint(img):
|
|
20 |
return res[:,:,::-1]
|
21 |
|
22 |
iface = gr.Interface(fn=sod_inpaint, inputs="image", outputs="image", examples='examples', title='显著物体消除', description='这是一个图像API,功能是自动把画面中的显著物体消除', theme='huggingface')
|
23 |
-
iface.launch(
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import inpaint.infer_model as inpaint
|
3 |
import sod.infer_model as sod
|
4 |
import numpy as np
|
5 |
import torch
|
6 |
+
# import os
|
7 |
# cmd = 'sh download.sh'
|
8 |
# os.system(cmd)
|
9 |
|
|
|
19 |
return res[:,:,::-1]
|
20 |
|
21 |
iface = gr.Interface(fn=sod_inpaint, inputs="image", outputs="image", examples='examples', title='显著物体消除', description='这是一个图像API,功能是自动把画面中的显著物体消除', theme='huggingface')
|
22 |
+
iface.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
absl-py==1.0.0
|
2 |
+
aiohttp==3.8.1
|
3 |
+
aiosignal==1.2.0
|
4 |
+
analytics-python==1.4.0
|
5 |
+
antlr4-python3-runtime==4.8
|
6 |
+
anyio==3.5.0
|
7 |
+
asgiref==3.5.1
|
8 |
+
async-timeout==4.0.2
|
9 |
+
attrs==21.4.0
|
10 |
+
backoff==1.10.0
|
11 |
+
bcrypt==3.2.2
|
12 |
+
brotlipy==0.7.0
|
13 |
+
cachetools==5.0.0
|
14 |
+
certifi==2021.10.8
|
15 |
+
cffi @ file:///opt/conda/conda-bld/cffi_1642701102775/work
|
16 |
+
charset-normalizer==2.0.12
|
17 |
+
click==8.1.3
|
18 |
+
cryptography==37.0.2
|
19 |
+
cycler==0.11.0
|
20 |
+
fastapi==0.76.0
|
21 |
+
ffmpy==0.3.0
|
22 |
+
Flask==2.1.2
|
23 |
+
Flask-CacheBuster==1.0.0
|
24 |
+
Flask-Cors==3.0.10
|
25 |
+
Flask-Login==0.6.1
|
26 |
+
fonttools==4.33.3
|
27 |
+
frozenlist==1.3.0
|
28 |
+
fsspec==2022.3.0
|
29 |
+
google-auth==2.6.6
|
30 |
+
google-auth-oauthlib==0.4.6
|
31 |
+
gradio==2.6.0
|
32 |
+
grpcio==1.46.0
|
33 |
+
h11==0.13.0
|
34 |
+
idna @ file:///tmp/build/80754af9/idna_1637925883363/work
|
35 |
+
importlib-metadata==4.11.3
|
36 |
+
itsdangerous==2.1.2
|
37 |
+
Jinja2==3.1.2
|
38 |
+
kiwisolver==1.4.2
|
39 |
+
kornia==0.5.0
|
40 |
+
linkify-it-py==1.0.3
|
41 |
+
Markdown==3.3.7
|
42 |
+
markdown-it-py==2.1.0
|
43 |
+
markdown2==2.4.3
|
44 |
+
MarkupSafe==2.1.1
|
45 |
+
matplotlib==3.5.2
|
46 |
+
mdit-py-plugins==0.3.0
|
47 |
+
mdurl==0.1.1
|
48 |
+
mkl-fft==1.3.1
|
49 |
+
mkl-random @ file:///tmp/build/80754af9/mkl_random_1626186066731/work
|
50 |
+
mkl-service==2.4.0
|
51 |
+
monotonic==1.6
|
52 |
+
multidict==6.0.2
|
53 |
+
numpy==1.22.3
|
54 |
+
oauthlib==3.2.0
|
55 |
+
omegaconf==2.2.0
|
56 |
+
opencv-python==3.4.16.57
|
57 |
+
orjson==3.6.8
|
58 |
+
packaging==21.3
|
59 |
+
pandas==1.4.2
|
60 |
+
paramiko==2.10.4
|
61 |
+
Pillow==9.1.0
|
62 |
+
protobuf==3.20.1
|
63 |
+
pyasn1==0.4.8
|
64 |
+
pyasn1-modules==0.2.8
|
65 |
+
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
|
66 |
+
pycryptodome==3.14.1
|
67 |
+
pydantic==1.9.0
|
68 |
+
pyDeprecate==0.3.2
|
69 |
+
pydub==0.25.1
|
70 |
+
PyNaCl==1.5.0
|
71 |
+
pyOpenSSL @ file:///opt/conda/conda-bld/pyopenssl_1643788558760/work
|
72 |
+
pyparsing==3.0.8
|
73 |
+
PySocks @ file:///tmp/build/80754af9/pysocks_1605305812635/work
|
74 |
+
python-dateutil==2.8.2
|
75 |
+
python-multipart==0.0.5
|
76 |
+
pytorch-lightning==1.6.3
|
77 |
+
pytz==2022.1
|
78 |
+
PyYAML==6.0
|
79 |
+
requests @ file:///opt/conda/conda-bld/requests_1641824580448/work
|
80 |
+
requests-oauthlib==1.3.1
|
81 |
+
rsa==4.8
|
82 |
+
six @ file:///tmp/build/80754af9/six_1644875935023/work
|
83 |
+
sniffio==1.2.0
|
84 |
+
starlette==0.18.0
|
85 |
+
tensorboard==2.9.0
|
86 |
+
tensorboard-data-server==0.6.1
|
87 |
+
tensorboard-plugin-wit==1.8.1
|
88 |
+
timm==0.5.4
|
89 |
+
torch==1.11.0
|
90 |
+
torchaudio==0.11.0
|
91 |
+
torchmetrics==0.8.1
|
92 |
+
torchvision==0.12.0
|
93 |
+
tqdm==4.64.0
|
94 |
+
typing_extensions==4.2.0
|
95 |
+
uc-micro-py==1.0.1
|
96 |
+
urllib3 @ file:///opt/conda/conda-bld/urllib3_1650639997961/work
|
97 |
+
uvicorn==0.17.6
|
98 |
+
Werkzeug==2.1.2
|
99 |
+
yarl==1.7.2
|
100 |
+
zipp==3.8.0
|