Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,3 @@
|
|
1 |
-
# PyTorch 2.8 (temporary hack)
|
2 |
-
import os
|
3 |
-
os.system('pip install --upgrade --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu126 "torch<2.9" spaces')
|
4 |
-
|
5 |
import os
|
6 |
import spaces
|
7 |
import random
|
@@ -246,11 +242,6 @@ MAX_SEED = 1e7
|
|
246 |
title = "## AI 3D Model Generator"
|
247 |
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)."
|
248 |
|
249 |
-
# 顶层增加哨兵 GPU 函数
|
250 |
-
@spaces.GPU(duration=1)
|
251 |
-
def _gpu_check():
|
252 |
-
return "GPU ready"
|
253 |
-
|
254 |
with gr.Blocks().queue() as demo:
|
255 |
gr.Markdown(title)
|
256 |
gr.Markdown(description)
|
@@ -312,4 +303,6 @@ if __name__ == "__main__":
|
|
312 |
|
313 |
app = gr.mount_gradio_app(app, demo, path="/")
|
314 |
# demo.launch()
|
|
|
|
|
315 |
uvicorn.run(app, host=args.host, port=args.port)
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
import spaces
|
3 |
import random
|
|
|
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)
|
|
|
303 |
|
304 |
app = gr.mount_gradio_app(app, demo, path="/")
|
305 |
# demo.launch()
|
306 |
+
from spaces import zero
|
307 |
+
zero.startup()
|
308 |
uvicorn.run(app, host=args.host, port=args.port)
|