Spaces:
Runtime error
Runtime error
aresnow
commited on
Commit
·
da0667c
1
Parent(s):
371c2f5
start worker
Browse files
app.py
CHANGED
|
@@ -450,11 +450,15 @@ class GradioApp:
|
|
| 450 |
async def launch_xinference():
|
| 451 |
import xoscar as xo
|
| 452 |
from xinference.core.service import SupervisorActor
|
|
|
|
| 453 |
|
| 454 |
pool = await xo.create_actor_pool(address="0.0.0.0", n_process=0)
|
| 455 |
await xo.create_actor(
|
| 456 |
SupervisorActor, address=pool.external_address, uid=SupervisorActor.uid()
|
| 457 |
)
|
|
|
|
|
|
|
|
|
|
| 458 |
gradio_block = GradioApp(pool.external_address).build()
|
| 459 |
gradio_block.launch()
|
| 460 |
|
|
|
|
| 450 |
async def launch_xinference():
|
| 451 |
import xoscar as xo
|
| 452 |
from xinference.core.service import SupervisorActor
|
| 453 |
+
from xinference.deploy.worker import start_worker_components
|
| 454 |
|
| 455 |
pool = await xo.create_actor_pool(address="0.0.0.0", n_process=0)
|
| 456 |
await xo.create_actor(
|
| 457 |
SupervisorActor, address=pool.external_address, uid=SupervisorActor.uid()
|
| 458 |
)
|
| 459 |
+
await start_worker_components(
|
| 460 |
+
address=pool.external_address, supervisor_address=pool.external_address
|
| 461 |
+
)
|
| 462 |
gradio_block = GradioApp(pool.external_address).build()
|
| 463 |
gradio_block.launch()
|
| 464 |
|