huolongguo10 commited on
Commit
425d143
1 Parent(s): d85320c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,12 +6,12 @@ from pathlib import Path
6
  import chatglm_cpp
7
  import gradio as gr
8
 
9
- DEFAULT_MODEL_PATH = Path(__file__).resolve().parent.parent / "chatglm3-ggml.bin"
10
-
11
  parser = argparse.ArgumentParser()
12
  parser.add_argument("-m", "--model", default=DEFAULT_MODEL_PATH, type=Path, help="model path")
13
  parser.add_argument("--mode", default="chat", type=str, choices=["chat", "generate"], help="inference mode")
14
- parser.add_argument("-l", "--max_length", default=2048, type=int, help="max total length including prompt and output")
15
  parser.add_argument("-c", "--max_context_length", default=512, type=int, help="max context length")
16
  parser.add_argument("--top_k", default=0, type=int, help="top-k sampling")
17
  parser.add_argument("--top_p", default=0.7, type=float, help="top-p sampling")
 
6
  import chatglm_cpp
7
  import gradio as gr
8
 
9
+ # DEFAULT_MODEL_PATH = Path(__file__).resolve().parent.parent / "chatglm3-ggml.bin"
10
+ DEFAULT_MODEL_PATH = "./chatglm3-ggml.bin"
11
  parser = argparse.ArgumentParser()
12
  parser.add_argument("-m", "--model", default=DEFAULT_MODEL_PATH, type=Path, help="model path")
13
  parser.add_argument("--mode", default="chat", type=str, choices=["chat", "generate"], help="inference mode")
14
+ parser.add_argument("-l", "--max_length", default=4096, type=int, help="max total length including prompt and output")
15
  parser.add_argument("-c", "--max_context_length", default=512, type=int, help="max context length")
16
  parser.add_argument("--top_k", default=0, type=int, help="top-k sampling")
17
  parser.add_argument("--top_p", default=0.7, type=float, help="top-p sampling")