Aluren commited on
Commit
580a7be
·
verified ·
1 Parent(s): cb9f286

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -45
app.py CHANGED
@@ -31,53 +31,55 @@ MARKDOWN = """
31
  """
32
  EXAMPLES = [
33
  [
34
- {
35
- "image": "assets/image/100.png",
36
- },
 
37
  "assets/model/100.glb",
38
  42,
39
  False,
40
  ],
41
- [
42
- {
43
- "image": "assets/image/503d193a-1b9b-4685-b05f-00ac82f93d7b.png",
44
- },
45
- "assets/model/503d193a-1b9b-4685-b05f-00ac82f93d7b.glb",
46
- 42,
47
- False,
48
- ],
49
- [
50
- {
51
- "image": "assets/image/34933195-9c2c-4271-8d31-a28bc5348b7a.png",
52
- },
53
- "assets/model/34933195-9c2c-4271-8d31-a28bc5348b7a.glb",
54
- 42,
55
- False,
56
- ],
57
- [
58
- {
59
- "image": "assets/image/a5d09c66-1617-465c-aec9-431f48d9a7e1.png",
60
- },
61
- "assets/model/a5d09c66-1617-465c-aec9-431f48d9a7e1.glb",
62
- 42,
63
- False,
64
- ],
65
- [
66
- {
67
- "image": "assets/image/cb7e6c4a-b4dd-483c-9789-3d4887ee7434.png",
68
- },
69
- "assets/model/cb7e6c4a-b4dd-483c-9789-3d4887ee7434.glb",
70
- 42,
71
- False,
72
- ],
73
- [
74
- {
75
- "image": "assets/image/e799e6b4-3b47-40e0-befb-b156af8758ad.png",
76
- },
77
- "assets/model/instant3d/e799e6b4-3b47-40e0-befb-b156af8758ad.glb",
78
- 42,
79
- False,
80
- ],
 
81
  ]
82
 
83
  os.makedirs(TMP_DIR, exist_ok=True)
@@ -160,8 +162,10 @@ def run_refinement(
160
  # print("rgb_image", rgb_image)
161
  # print("mesh", rgb_image)
162
 
163
- if not isinstance(rgb_image, Image.Image) and "image" in rgb_image:
164
- rgb_image = Image.open(rgb_image["image"]).convert("RGB")
 
 
165
 
166
  scene = run_detailgen3d(
167
  pipeline,
 
31
  """
32
  EXAMPLES = [
33
  [
34
+ # {
35
+ # "image": "assets/image/100.png",
36
+ # },
37
+ "assets/image/100.png",
38
  "assets/model/100.glb",
39
  42,
40
  False,
41
  ],
42
+ # [
43
+ # {
44
+ # "image": "assets/image/503d193a-1b9b-4685-b05f-00ac82f93d7b.png",
45
+ # },
46
+ # "assets/image/503d193a-1b9b-4685-b05f-00ac82f93d7b.png",
47
+ # "assets/model/503d193a-1b9b-4685-b05f-00ac82f93d7b.glb",
48
+ # 42,
49
+ # False,
50
+ # ],
51
+ # [
52
+ # {
53
+ # "image": "assets/image/34933195-9c2c-4271-8d31-a28bc5348b7a.png",
54
+ # },
55
+ # "assets/model/34933195-9c2c-4271-8d31-a28bc5348b7a.glb",
56
+ # 42,
57
+ # False,
58
+ # ],
59
+ # [
60
+ # {
61
+ # "image": "assets/image/a5d09c66-1617-465c-aec9-431f48d9a7e1.png",
62
+ # },
63
+ # "assets/model/a5d09c66-1617-465c-aec9-431f48d9a7e1.glb",
64
+ # 42,
65
+ # False,
66
+ # ],
67
+ # [
68
+ # {
69
+ # "image": "assets/image/cb7e6c4a-b4dd-483c-9789-3d4887ee7434.png",
70
+ # },
71
+ # "assets/model/cb7e6c4a-b4dd-483c-9789-3d4887ee7434.glb",
72
+ # 42,
73
+ # False,
74
+ # ],
75
+ # [
76
+ # {
77
+ # "image": "assets/image/e799e6b4-3b47-40e0-befb-b156af8758ad.png",
78
+ # },
79
+ # "assets/model/instant3d/e799e6b4-3b47-40e0-befb-b156af8758ad.glb",
80
+ # 42,
81
+ # False,
82
+ # ],
83
  ]
84
 
85
  os.makedirs(TMP_DIR, exist_ok=True)
 
162
  # print("rgb_image", rgb_image)
163
  # print("mesh", rgb_image)
164
 
165
+ # if not isinstance(rgb_image, Image.Image) and "image" in rgb_image:
166
+ # rgb_image = Image.open(rgb_image["image"]).convert("RGB")
167
+
168
+ rgb_image = Image.open(rgb_image).convert("RGB")
169
 
170
  scene = run_detailgen3d(
171
  pipeline,