Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ def start_worker(model_path: str, bits=16):
|
|
| 36 |
"-m",
|
| 37 |
"llava.serve.model_worker",
|
| 38 |
"--host",
|
| 39 |
-
"
|
| 40 |
"--controller",
|
| 41 |
"http://localhost:10000",
|
| 42 |
"--model-path",
|
|
@@ -53,7 +53,7 @@ def start_worker(model_path: str, bits=16):
|
|
| 53 |
|
| 54 |
if __name__ == "__main__":
|
| 55 |
parser = argparse.ArgumentParser()
|
| 56 |
-
parser.add_argument("--host", type=str, default="
|
| 57 |
parser.add_argument("--port", type=int)
|
| 58 |
parser.add_argument("--controller-url", type=str, default="http://localhost:10000")
|
| 59 |
parser.add_argument("--concurrency-count", type=int, default=5)
|
|
@@ -78,7 +78,7 @@ Set the environment variable `model` to change the model:
|
|
| 78 |
print(f"args: {gws.args}")
|
| 79 |
|
| 80 |
model_path = os.getenv("model", "liuhaotian/llava-v1.6-mistral-7b")
|
| 81 |
-
bits = int(os.getenv("bits",
|
| 82 |
concurrency_count = int(os.getenv("concurrency_count", 5))
|
| 83 |
|
| 84 |
controller_proc = start_controller()
|
|
@@ -95,7 +95,7 @@ Set the environment variable `model` to change the model:
|
|
| 95 |
api_open=False
|
| 96 |
).launch(
|
| 97 |
server_name=gws.args.host,
|
| 98 |
-
server_port=
|
| 99 |
share=True
|
| 100 |
)
|
| 101 |
|
|
@@ -106,4 +106,4 @@ Set the environment variable `model` to change the model:
|
|
| 106 |
worker_proc.kill()
|
| 107 |
controller_proc.kill()
|
| 108 |
|
| 109 |
-
sys.exit(exit_status)
|
|
|
|
| 36 |
"-m",
|
| 37 |
"llava.serve.model_worker",
|
| 38 |
"--host",
|
| 39 |
+
"0.0.0.0",
|
| 40 |
"--controller",
|
| 41 |
"http://localhost:10000",
|
| 42 |
"--model-path",
|
|
|
|
| 53 |
|
| 54 |
if __name__ == "__main__":
|
| 55 |
parser = argparse.ArgumentParser()
|
| 56 |
+
parser.add_argument("--host", type=str, default="0.0.0.0")
|
| 57 |
parser.add_argument("--port", type=int)
|
| 58 |
parser.add_argument("--controller-url", type=str, default="http://localhost:10000")
|
| 59 |
parser.add_argument("--concurrency-count", type=int, default=5)
|
|
|
|
| 78 |
print(f"args: {gws.args}")
|
| 79 |
|
| 80 |
model_path = os.getenv("model", "liuhaotian/llava-v1.6-mistral-7b")
|
| 81 |
+
bits = int(os.getenv("bits", 4))
|
| 82 |
concurrency_count = int(os.getenv("concurrency_count", 5))
|
| 83 |
|
| 84 |
controller_proc = start_controller()
|
|
|
|
| 95 |
api_open=False
|
| 96 |
).launch(
|
| 97 |
server_name=gws.args.host,
|
| 98 |
+
server_port=gws.args.port,
|
| 99 |
share=True
|
| 100 |
)
|
| 101 |
|
|
|
|
| 106 |
worker_proc.kill()
|
| 107 |
controller_proc.kill()
|
| 108 |
|
| 109 |
+
sys.exit(exit_status)
|