Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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(
|
215 |
-
enhance_image: bool = Form(
|
216 |
-
do_remove_background: bool = Form(
|
217 |
-
foreground_ratio: float = Form(
|
218 |
-
mc_resolution: int = Form(
|
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 |
):
|