mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
refac
This commit is contained in:
parent
619dbbe9f5
commit
39c57c0e94
1 changed files with 3 additions and 5 deletions
|
|
@ -212,11 +212,9 @@ def update_reranking_model(
|
||||||
# and the following error is thrown:
|
# and the following error is thrown:
|
||||||
# /root/.cache/torch_extensions/py311_cpu/segmented_maxsim_cpp/segmented_maxsim_cpp.so: cannot open shared object file: No such file or directory
|
# /root/.cache/torch_extensions/py311_cpu/segmented_maxsim_cpp/segmented_maxsim_cpp.so: cannot open shared object file: No such file or directory
|
||||||
|
|
||||||
torch_extensions = "/root/.cache/torch_extensions/py311_cpu"
|
lock_file = "/root/.cache/torch_extensions/py311_cpu/segmented_maxsim_cpp/lock"
|
||||||
try:
|
if os.path.exists(lock_file):
|
||||||
shutil.rmtree(torch_extensions)
|
os.remove(lock_file)
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
self.ckpt = Checkpoint(
|
self.ckpt = Checkpoint(
|
||||||
name,
|
name,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue