Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -242,6 +242,11 @@ MAX_SEED = 1e7
|
|
242 |
title = "## AI 3D Model Generator"
|
243 |
description = "Our Image-to-3D Generator transforms your 2D photos into stunning, AI generated 3D models—ready for games, AR/VR, or 3D printing. Our AI 3D Modeling is based on Hunyuan 2.0. Check more in [imgto3d.ai](https://www.imgto3d.ai)."
|
244 |
|
|
|
|
|
|
|
|
|
|
|
245 |
with gr.Blocks().queue() as demo:
|
246 |
gr.Markdown(title)
|
247 |
gr.Markdown(description)
|
@@ -288,6 +293,7 @@ with gr.Blocks().queue() as demo:
|
|
288 |
outputs=[html_export_mesh,file_export, glbPath_output, objPath_output]
|
289 |
)
|
290 |
|
|
|
291 |
if __name__ == "__main__":
|
292 |
# https://discuss.huggingface.co/t/how-to-serve-an-html-file/33921/2
|
293 |
# create a FastAPI app
|
|
|
242 |
title = "## AI 3D Model Generator"
|
243 |
description = "Our Image-to-3D Generator transforms your 2D photos into stunning, AI generated 3D models—ready for games, AR/VR, or 3D printing. Our AI 3D Modeling is based on Hunyuan 2.0. Check more in [imgto3d.ai](https://www.imgto3d.ai)."
|
244 |
|
245 |
+
# 顶层增加哨兵 GPU 函数
|
246 |
+
@spaces.GPU(duration=1)
|
247 |
+
def _gpu_check():
|
248 |
+
return "GPU ready"
|
249 |
+
|
250 |
with gr.Blocks().queue() as demo:
|
251 |
gr.Markdown(title)
|
252 |
gr.Markdown(description)
|
|
|
293 |
outputs=[html_export_mesh,file_export, glbPath_output, objPath_output]
|
294 |
)
|
295 |
|
296 |
+
_gpu_check() # 👈 顶层调用哨兵函数
|
297 |
if __name__ == "__main__":
|
298 |
# https://discuss.huggingface.co/t/how-to-serve-an-html-file/33921/2
|
299 |
# create a FastAPI app
|