Spaces:
Runtime error
Runtime error
RamAnanth1
commited on
Commit
•
ff13300
1
Parent(s):
9ebf0b7
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
import gradio as gr
|
4 |
import PIL.Image
|
5 |
import os
|
6 |
-
from gradio_client import Client
|
7 |
|
8 |
lgm_mini_client = Client("dylanebert/LGM-mini")
|
9 |
triposr_client = Client("stabilityai/TripoSR")
|
@@ -37,7 +37,7 @@ def run(image, model_name):
|
|
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,7 +45,7 @@ def run(image, model_name):
|
|
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
|
|
|
3 |
import gradio as gr
|
4 |
import PIL.Image
|
5 |
import os
|
6 |
+
from gradio_client import Client, file
|
7 |
|
8 |
lgm_mini_client = Client("dylanebert/LGM-mini")
|
9 |
triposr_client = Client("stabilityai/TripoSR")
|
|
|
37 |
|
38 |
elif model_name=='crm':
|
39 |
preprocess_result = crm_client.predict(
|
40 |
+
file(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 |
+
file(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
|