Update app/model_handler.py
Browse files19 unmodified lines2021222324252619 unmodified linesglobal model, tokenizertry:logger.info("Đang tải mô hình sửa lỗi chính tả")model_path = "/home/pmcd/Hoai/model_vietnamcorrection"model = AutoModelForSeq2SeqLM.from_pretrained(model_path).to("cuda:0") # Sử dụng GPU nếu cótokenizer = AutoTokenizer.from_pretrained(model_path)logger.info("Đã tải mô hình thành công")19 unmodified lines2021222324252619 unmodified linesglobal model, tokenizertry:logger.info("Đang tải mô hình sửa lỗi chính tả")model_path = "hHoai/spellcheck"model = AutoModelForSeq2SeqLM.from_pretrained(model_path).to("cuda:0") # Sử dụng GPU nếu cótokenizer = AutoTokenizer.from_pretrained(model_path)logger.info("Đã tải mô hình thành công")
app/model_handler.py+1-1