Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,9 +35,9 @@ def run(image, model_name):
|
|
| 35 |
|
| 36 |
output = result[0]
|
| 37 |
|
| 38 |
-
elif
|
| 39 |
preprocess_result = crm_client.predict(
|
| 40 |
-
|
| 41 |
"Auto Remove background", # Literal['Alpha as mask', 'Auto Remove background'] in 'backgroud choice' Radio component
|
| 42 |
1, # float (numeric value between 0.5 and 1.0) in 'Foreground Ratio' Slider component
|
| 43 |
"#000000", # str in 'Background Color' Colorpicker component
|
|
@@ -45,7 +45,7 @@ def run(image, model_name):
|
|
| 45 |
)
|
| 46 |
|
| 47 |
result = crm_client.predict(
|
| 48 |
-
|
| 49 |
1234, # float in 'seed' Number component
|
| 50 |
5.5, # float in 'guidance_scale' Number component
|
| 51 |
30, # float in 'sample steps' Number component
|
|
|
|
| 35 |
|
| 36 |
output = result[0]
|
| 37 |
|
| 38 |
+
elif model_name=='crm':
|
| 39 |
preprocess_result = crm_client.predict(
|
| 40 |
+
file_path, # filepath in 'Image input' Image component
|
| 41 |
"Auto Remove background", # Literal['Alpha as mask', 'Auto Remove background'] in 'backgroud choice' Radio component
|
| 42 |
1, # float (numeric value between 0.5 and 1.0) in 'Foreground Ratio' Slider component
|
| 43 |
"#000000", # str in 'Background Color' Colorpicker component
|
|
|
|
| 45 |
)
|
| 46 |
|
| 47 |
result = crm_client.predict(
|
| 48 |
+
preprocess_result, # filepath in 'Processed Image' Image component
|
| 49 |
1234, # float in 'seed' Number component
|
| 50 |
5.5, # float in 'guidance_scale' Number component
|
| 51 |
30, # float in 'sample steps' Number component
|