Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
|
@@ -32,7 +32,7 @@ async def get_image(image_name: str):
|
|
| 32 |
return {"error": "Image not found"}
|
| 33 |
|
| 34 |
def run_uvicorn():
|
| 35 |
-
uvicorn.run(app, host="127.0.0.1", port=
|
| 36 |
|
| 37 |
uvicorn_thread = threading.Thread(target=run_uvicorn)
|
| 38 |
uvicorn_thread.daemon = True
|
|
@@ -70,7 +70,7 @@ class EndpointHandler:
|
|
| 70 |
self.pipe.vae, mode="max-autotune-no-cudagraphs",
|
| 71 |
)
|
| 72 |
# ngrok
|
| 73 |
-
self.public_url = ngrok.connect(
|
| 74 |
# subprocess.Popen(['ngrok', 'http', '5000'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
| 75 |
|
| 76 |
logger.info("Ngrok is running in the background.")
|
|
|
|
| 32 |
return {"error": "Image not found"}
|
| 33 |
|
| 34 |
def run_uvicorn():
|
| 35 |
+
uvicorn.run(app, host="127.0.0.1", port=6000)
|
| 36 |
|
| 37 |
uvicorn_thread = threading.Thread(target=run_uvicorn)
|
| 38 |
uvicorn_thread.daemon = True
|
|
|
|
| 70 |
self.pipe.vae, mode="max-autotune-no-cudagraphs",
|
| 71 |
)
|
| 72 |
# ngrok
|
| 73 |
+
self.public_url = ngrok.connect(6000).public_url
|
| 74 |
# subprocess.Popen(['ngrok', 'http', '5000'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
| 75 |
|
| 76 |
logger.info("Ngrok is running in the background.")
|