Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -105,7 +105,7 @@ async def generate_3d_model(request: GenerateRequest, image: UploadFile = File(.
|
|
| 105 |
if os.path.exists(save_dir):
|
| 106 |
shutil.rmtree(save_dir)
|
| 107 |
|
| 108 |
-
# Gradio-related functions
|
| 109 |
HEADER = """
|
| 110 |
# 🌌 PolyGenixAI: Craft 3D Worlds with Cosmic Precision
|
| 111 |
## Unleash Infinite Creativity with AI-Powered 3D Generation by AnvilInteractive Solutions
|
|
@@ -597,14 +597,10 @@ with gr.Blocks(title="PolyGenixAI", css="body { background-color: #1A1A1A; } .gr
|
|
| 597 |
|
| 598 |
# Run FastAPI and Gradio concurrently
|
| 599 |
async def run_servers():
|
| 600 |
-
# Start FastAPI with Uvicorn
|
| 601 |
config = uvicorn.Config(app=app, host="0.0.0.0", port=8000)
|
| 602 |
server = uvicorn.Server(config)
|
| 603 |
fastapi_task = asyncio.create_task(server.serve())
|
| 604 |
-
|
| 605 |
-
# Start Gradio
|
| 606 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 607 |
-
|
| 608 |
await fastapi_task
|
| 609 |
|
| 610 |
if __name__ == "__main__":
|
|
|
|
| 105 |
if os.path.exists(save_dir):
|
| 106 |
shutil.rmtree(save_dir)
|
| 107 |
|
| 108 |
+
# Gradio-related functions
|
| 109 |
HEADER = """
|
| 110 |
# 🌌 PolyGenixAI: Craft 3D Worlds with Cosmic Precision
|
| 111 |
## Unleash Infinite Creativity with AI-Powered 3D Generation by AnvilInteractive Solutions
|
|
|
|
| 597 |
|
| 598 |
# Run FastAPI and Gradio concurrently
|
| 599 |
async def run_servers():
|
|
|
|
| 600 |
config = uvicorn.Config(app=app, host="0.0.0.0", port=8000)
|
| 601 |
server = uvicorn.Server(config)
|
| 602 |
fastapi_task = asyncio.create_task(server.serve())
|
|
|
|
|
|
|
| 603 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 604 |
await fastapi_task
|
| 605 |
|
| 606 |
if __name__ == "__main__":
|