mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
init README of deepdoc, add picture processer. (#71)
* init README of deepdoc, add picture processer. * add resume parsing
This commit is contained in:
@ -64,7 +64,11 @@ def load_model(model_dir, nm):
|
||||
if not os.path.exists(model_file_path):
|
||||
raise ValueError("not find model file path {}".format(
|
||||
model_file_path))
|
||||
sess = ort.InferenceSession(model_file_path)
|
||||
|
||||
if ort.get_device() == "GPU":
|
||||
sess = ort.InferenceSession(model_file_path, providers=['CUDAExecutionProvider'])
|
||||
else:
|
||||
sess = ort.InferenceSession(model_file_path, providers=['CPUExecutionProvider'])
|
||||
return sess, sess.get_inputs()[0]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user