rdjarbeng commited on
Commit
1e9e55a
·
1 Parent(s): 697345d

add other packages with versions

Browse files
Files changed (2) hide show
  1. app.py +13 -12
  2. requirements.txt +8 -1
app.py CHANGED
@@ -132,17 +132,18 @@ def remove_background(input_path, bg_color=None, transparent_bg=True, model_choi
132
  return None
133
 
134
  # Fixed examples with proper values for all inputs
135
- examples = [
136
- [
137
- 'scifi_man1.jpg', # input_path
138
- "#FFFFFF", # bg_color (white)
139
- True, # transparent_bg
140
- "", # model_choice (empty string, which is in the choices)
141
- False, # alpha_matting
142
- False, # post_process_mask
143
- False # only_mask
144
- ]
145
- ]
 
146
 
147
  # Gradio interface
148
  iface = gr.Interface(
@@ -165,7 +166,7 @@ iface = gr.Interface(
165
  gr.Image(type="filepath", label="Output Image (PNG)")
166
  ],
167
  examples=examples,
168
- title="Background Remover RD v2.8",
169
  description="Upload an image to remove the background. Choose a solid color or transparent background, select a model, and customize with alpha matting and other options. Right-click the output image to save as PNG.",
170
  allow_flagging="never",
171
  )
 
132
  return None
133
 
134
  # Fixed examples with proper values for all inputs
135
+ # examples = [
136
+ # [
137
+ # 'scifi_man1.jpg', # input_path
138
+ # "#FFFFFF", # bg_color (white)
139
+ # True, # transparent_bg
140
+ # "", # model_choice (empty string, which is in the choices)
141
+ # False, # alpha_matting
142
+ # False, # post_process_mask
143
+ # False # only_mask
144
+ # ]
145
+ # ]
146
+ examples = [['scifi_man1.jpg']]
147
 
148
  # Gradio interface
149
  iface = gr.Interface(
 
166
  gr.Image(type="filepath", label="Output Image (PNG)")
167
  ],
168
  examples=examples,
169
+ title="Background Remover v2.8",
170
  description="Upload an image to remove the background. Choose a solid color or transparent background, select a model, and customize with alpha matting and other options. Right-click the output image to save as PNG.",
171
  allow_flagging="never",
172
  )
requirements.txt CHANGED
@@ -1,2 +1,9 @@
 
 
 
 
 
 
 
1
  pillow
2
- rembg
 
1
+ gradio
2
+ uvicorn>=0.14.0
3
+ spaces
4
+ fastapi
5
+ pydantic==2.10.6
6
+ rembg==2.0.58
7
+ onnxruntime==1.18.0
8
  pillow
9
+ numpy==1.26.4