Skip to content

Commit 7d7e432

Browse files
committed
优化代码
1 parent c485dfc commit 7d7e432

File tree

28 files changed

+287
-1691
lines changed

28 files changed

+287
-1691
lines changed

Chatbot_Retrieval/settings.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
1616
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1717

18-
1918
# Quick-start development settings - unsuitable for production
2019
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
2120

@@ -27,7 +26,6 @@
2726

2827
ALLOWED_HOSTS = ['*']
2928

30-
3129
# Application definition
3230

3331
INSTALLED_APPS = [
@@ -37,8 +35,10 @@
3735
'django.contrib.sessions',
3836
'django.contrib.messages',
3937
'django.contrib.staticfiles',
38+
'Chatbot_Retrieval_model'
4039
]
4140

41+
4242
MIDDLEWARE = [
4343
'django.middleware.security.SecurityMiddleware',
4444
'django.contrib.sessions.middleware.SessionMiddleware',
@@ -70,17 +70,9 @@
7070

7171
WSGI_APPLICATION = 'Chatbot_Retrieval.wsgi.application'
7272

73-
7473
# Database
7574
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
7675

77-
DATABASES = {
78-
'default': {
79-
'ENGINE': 'django.db.backends.sqlite3',
80-
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
81-
}
82-
}
83-
8476

8577
# Password validation
8678
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
@@ -100,7 +92,6 @@
10092
},
10193
]
10294

103-
10495
# Internationalization
10596
# https://docs.djangoproject.com/en/2.2/topics/i18n/
10697

@@ -114,7 +105,6 @@
114105

115106
USE_TZ = True
116107

117-
118108
# Static files (CSS, JavaScript, Images)
119109
# https://docs.djangoproject.com/en/2.2/howto/static-files/
120110

Chatbot_Retrieval/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
from django.contrib import admin
1717
from django.urls import path, include
1818

19+
1920
urlpatterns = [
2021
path('admin/', admin.site.urls),
2122

2223

2324
path('api/', include("Chatbot_Retrival_rest.urls")),
25+
2426
]

Chatbot_Retrieval_model/Bert_sim/config_bert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self):
2323
self.bert_config_file = '/Data/public/pretrained_models/tensorflow1.x/chinese-bert-wwm-ext/bert_config.json'
2424
self.vocab_file = '/Data/public/pretrained_models/tensorflow1.x/chinese-bert-wwm-ext/vocab.txt'
2525
self.data_dir = os.path.join(basedir, 'data/bert_sim/')
26-
self.output_dir = basedir + '/Chatbot_Retrieval_model/Bert_sim/saved_model_bert'
26+
self.output_dir = basedir + '/Chatbot_Retrieval_model_sss/Bert_sim/saved_model_bert'
2727
self.init_checkpoint = '/Data/public/pretrained_models/tensorflow1.x/chinese-bert-wwm-ext/bert_model.ckpt'
2828

2929
self.do_lower_case = True

Chatbot_Retrieval_model/QA/BM25.py

Lines changed: 0 additions & 266 deletions
This file was deleted.

0 commit comments

Comments
 (0)