NGUYEN, Xuan Phi commited on
Commit
e9cbae4
1 Parent(s): e33248e
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -697,23 +697,23 @@ MODEL_PATH = os.environ.get("MODEL_PATH", "notfound, please set `export MODEL_PA
697
 
698
  def launch():
699
  global demo, llm, DEBUG
 
 
 
 
 
 
 
 
 
 
700
  if DEBUG:
701
- model_desc + "<br>This is in debug mode, responses will be copy original"
702
  response_fn = debug_chat_response_echo
703
  else:
704
- model_desc = MODEL_DESC
705
- model_path = MODEL_PATH
706
- assert os.path.exists(model_path), f'{model_path} not found'
707
- model_title = MODEL_TITLE
708
- tensor_parallel = TENSOR_PARALLEL
709
- assert tensor_parallel > 0 , f'{tensor_parallel} invalid'
710
- dtype = DTYPE
711
-
712
  # ! load the model
713
  llm = LLM(model=model_path, dtype=dtype, tensor_parallel_size=tensor_parallel)
714
 
715
- sys_prompt = SYSTEM_PROMPT_1
716
- max_tokens = 4096
717
  print(f'Use system prompt:\n{sys_prompt}')
718
 
719
  # response_fn = chat_response_stream_multiturn if args.multiturn else chat_response_stream
 
697
 
698
  def launch():
699
  global demo, llm, DEBUG
700
+ model_desc = MODEL_DESC
701
+ model_path = MODEL_PATH
702
+ assert os.path.exists(model_path), f'{model_path} not found'
703
+ model_title = MODEL_TITLE
704
+ tensor_parallel = TENSOR_PARALLEL
705
+ assert tensor_parallel > 0 , f'{tensor_parallel} invalid'
706
+ dtype = DTYPE
707
+ sys_prompt = SYSTEM_PROMPT_1
708
+ max_tokens = 4096
709
+
710
  if DEBUG:
711
+ model_desc += "<br>!!!!! This is in debug mode, responses will be copy original"
712
  response_fn = debug_chat_response_echo
713
  else:
 
 
 
 
 
 
 
 
714
  # ! load the model
715
  llm = LLM(model=model_path, dtype=dtype, tensor_parallel_size=tensor_parallel)
716
 
 
 
717
  print(f'Use system prompt:\n{sys_prompt}')
718
 
719
  # response_fn = chat_response_stream_multiturn if args.multiturn else chat_response_stream