aladdin1995 commited on
Commit
6fe2c43
·
verified ·
1 Parent(s): 88c406e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -117,7 +117,7 @@ def gpu_predict(model_path, device_map, torch_dtype,
117
  assert output_res.count("think>") == 2
118
  new_prompt_ret = output_res.split("think>")[-1]
119
  if new_prompt_ret.startswith("\n"):
120
- new_prompt = new_prompt[1:]
121
  new_prompt = replace_single_quotes(new_prompt)
122
  except Exception:
123
  # 如果格式不符合预期,则直接回退为原始输入
 
117
  assert output_res.count("think>") == 2
118
  new_prompt_ret = output_res.split("think>")[-1]
119
  if new_prompt_ret.startswith("\n"):
120
+ new_prompt = new_prompt_ret[1:]
121
  new_prompt = replace_single_quotes(new_prompt)
122
  except Exception:
123
  # 如果格式不符合预期,则直接回退为原始输入