utils.py 498 Bytes
Newer Older
April Hu's avatar
April Hu committed
1
2
3
4
5
6
7
8
9
10
11
12
13
import argparse


def get_args() -> argparse.Namespace:
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "-p",
        "--precision",
        type=str,
        default="int4",
        choices=["int4", "bf16"],
        help="Which precisions to use",
    )
Muyang Li's avatar
Muyang Li committed
14
    parser.add_argument("--count-use", action="store_true", help="Whether to count the number of uses")
April Hu's avatar
April Hu committed
15
16
17
    parser.add_argument("--gradio-root-path", type=str, default="")
    args = parser.parse_args()
    return args