Skip to content

Commit

Permalink
Update inference.py
Browse files Browse the repository at this point in the history
  • Loading branch information
heroding77 authored Aug 9, 2024
1 parent 3103781 commit f6975a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inference/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def infer_one(mmd_file_path):
generated_ids = chat_model.generate(encodes,max_new_tokens=8192,do_sample=True)
response = tokenizer.batch_decode(generated_ids[: , len_input:])[0]
return response

def run_review(mmd_file_path):
infer_modelname = model_name.split('/')[-2]
infer_save_path = "./" + infer_modelname + '/'
Expand All @@ -58,5 +59,5 @@ def run_review(mmd_file_path):


if __name__ == "__main__":
review = run_review("/path/to")
review = run_review("/path/to/xxx.mmd")
print(review)

0 comments on commit f6975a5

Please sign in to comment.