vibs08 commited on
Commit
0c4832c
·
verified ·
1 Parent(s): 311f1b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -32,8 +32,6 @@ from tsr.system import TSR
32
  from tsr.utils import remove_background, resize_foreground, to_gradio_3d_orientation
33
 
34
 
35
- HEADER = """FRAME AI"""
36
-
37
  if torch.cuda.is_available():
38
  device = "cuda:0"
39
  else:
@@ -211,11 +209,11 @@ def upload_file_to_s3(file_path, bucket_name, object_name=None):
211
  @app.post("/process_image/")
212
  async def process_image(
213
  file: UploadFile = File(...),
214
- seed: int = Form(0),
215
- enhance_image: bool = Form(False), # Default enhance_image value
216
- do_remove_background: bool = Form(True), # Default do_remove_background value
217
- foreground_ratio: float = Form(0.85, gt=0.0, lt=1.0), # Ratio must be between 0.0 and 1.0 (exclusive)
218
- mc_resolution: int = Form(286, ge=32, le=320), # Resolution must be between 256 and 4096
219
  auth: str = Form(...),
220
  text_prompt: Optional[str] = Form(None)
221
  ):
 
32
  from tsr.utils import remove_background, resize_foreground, to_gradio_3d_orientation
33
 
34
 
 
 
35
  if torch.cuda.is_available():
36
  device = "cuda:0"
37
  else:
 
209
  @app.post("/process_image/")
210
  async def process_image(
211
  file: UploadFile = File(...),
212
+ seed: int = Form(...),
213
+ enhance_image: bool = Form(...), # Default enhance_image value
214
+ do_remove_background: bool = Form(...), # Default do_remove_background value
215
+ foreground_ratio: float = Form(...), # Ratio must be between 0.0 and 1.0 (exclusive)
216
+ mc_resolution: int = Form(...), # Resolution must be between 256 and 4096
217
  auth: str = Form(...),
218
  text_prompt: Optional[str] = Form(None)
219
  ):