Skip to content

Commit

Permalink
feat: 模型下载目录修改
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 committed Dec 18, 2023
1 parent 4a86dad commit 51a31b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions install_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
from transformers import GPT2TokenizerFast
import sentence_transformers

prefix_dir = os.path.join(os.path.dirname(os.path.abspath(os.getcwd())), 'model')

prefix_dir = "/opt/maxkb/model"
model_config = [
{
'download_params': {
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ def perform_db_migrate():

def start_services():
management.call_command('migrate')
management.call_command('runserver',"0.0.0.0:8000")
management.call_command('runserver', "0.0.0.0:8000")


if __name__ == '__main__':
os.environ['TRANSFORMERS_CACHE'] = '/opt/maxkb/model'
os.environ['TRANSFORMERS_CACHE'] = '/opt/maxkb/model/base'
parser = argparse.ArgumentParser(
description="""
qabot service control tools;
Expand Down

0 comments on commit 51a31b5

Please sign in to comment.