Spaces:
Runtime error
Runtime error
RamAnanth1
commited on
Commit
•
1ca0068
1
Parent(s):
80ea7a7
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import PIL.Image
|
|
5 |
|
6 |
from gradio_client import Client
|
7 |
|
8 |
-
|
9 |
triposr_client = Client("stabilityai/TripoSR")
|
10 |
|
11 |
|
@@ -14,13 +14,11 @@ def run(image, model_name):
|
|
14 |
image.save(file_path)
|
15 |
print(file_path)
|
16 |
model_name = model_name.lower()
|
17 |
-
if model_name=='
|
18 |
-
result =
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
2, # float (numeric value between 2 and 100) in 'Number of inference steps' Slider component
|
23 |
-
api_name="/image-to-3d")
|
24 |
output = result
|
25 |
|
26 |
elif model_name=='triposr':
|
@@ -37,7 +35,7 @@ def run(image, model_name):
|
|
37 |
32, # float (numeric value between 32 and 320) in 'Marching Cubes Resolution' Slider component
|
38 |
api_name="/generate")
|
39 |
|
40 |
-
output = result[
|
41 |
|
42 |
return output
|
43 |
|
|
|
5 |
|
6 |
from gradio_client import Client
|
7 |
|
8 |
+
lgm_mini_client = Client("dylanebert/LGM-mini")
|
9 |
triposr_client = Client("stabilityai/TripoSR")
|
10 |
|
11 |
|
|
|
14 |
image.save(file_path)
|
15 |
print(file_path)
|
16 |
model_name = model_name.lower()
|
17 |
+
if model_name=='lgm-mini':
|
18 |
+
result = lgm_mini_client.predict(
|
19 |
+
file_path, # filepath in 'image' Image component
|
20 |
+
api_name="/run"
|
21 |
+
)
|
|
|
|
|
22 |
output = result
|
23 |
|
24 |
elif model_name=='triposr':
|
|
|
35 |
32, # float (numeric value between 32 and 320) in 'Marching Cubes Resolution' Slider component
|
36 |
api_name="/generate")
|
37 |
|
38 |
+
output = result[0]
|
39 |
|
40 |
return output
|
41 |
|