- gradio_app.py +2 -2
gradio_app.py
CHANGED
@@ -46,7 +46,7 @@ COND_HEIGHT = 512
|
|
46 |
COND_DISTANCE = 2.2
|
47 |
COND_FOVY = 0.591627
|
48 |
BACKGROUND_COLOR = [0.5, 0.5, 0.5]
|
49 |
-
OUTPUT_DIR = "output"
|
50 |
os.makedirs(OUTPUT_DIR, exist_ok=True)
|
51 |
|
52 |
device = spar3d_utils.get_device()
|
@@ -175,7 +175,7 @@ def generate_and_process_3d(image: Image.Image) -> str:
|
|
175 |
filename = f'model_{unique_id}.glb'
|
176 |
output_path = os.path.join(OUTPUT_DIR, filename)
|
177 |
trimesh_mesh.export(output_path, file_type="glb", include_normals=True)
|
178 |
-
public_url = f"https://rgndgn-i3d.hf.space/file={output_path}"
|
179 |
|
180 |
return public_url
|
181 |
|
|
|
46 |
COND_DISTANCE = 2.2
|
47 |
COND_FOVY = 0.591627
|
48 |
BACKGROUND_COLOR = [0.5, 0.5, 0.5]
|
49 |
+
OUTPUT_DIR = "./output"
|
50 |
os.makedirs(OUTPUT_DIR, exist_ok=True)
|
51 |
|
52 |
device = spar3d_utils.get_device()
|
|
|
175 |
filename = f'model_{unique_id}.glb'
|
176 |
output_path = os.path.join(OUTPUT_DIR, filename)
|
177 |
trimesh_mesh.export(output_path, file_type="glb", include_normals=True)
|
178 |
+
public_url = f"https://rgndgn-i3d.hf.space/file={Path(output_path).resolve()}"
|
179 |
|
180 |
return public_url
|
181 |
|