fix issue#7
This commit is contained in:
		
							parent
							
								
									eeed2f3ff6
								
							
						
					
					
						commit
						95f150b08c
					
				| @ -1,10 +1,6 @@ | |||||||
| import os | import os | ||||||
| import sys |  | ||||||
| import logging | import logging | ||||||
| import torch | import torch | ||||||
| import openai |  | ||||||
| import base64 |  | ||||||
| from .utils import is_running_in_docker |  | ||||||
| # 日志格式 | # 日志格式 | ||||||
| LOG_FORMAT = "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s" | LOG_FORMAT = "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s" | ||||||
| logger = logging.getLogger() | logger = logging.getLogger() | ||||||
| @ -156,7 +152,7 @@ NELUBA_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__fil | |||||||
| 
 | 
 | ||||||
| for _path in [LOG_PATH, SOURCE_PATH, KB_ROOT_PATH, NLTK_DATA_PATH, JUPYTER_WORK_PATH, WEB_CRAWL_PATH, NELUBA_PATH]: | for _path in [LOG_PATH, SOURCE_PATH, KB_ROOT_PATH, NLTK_DATA_PATH, JUPYTER_WORK_PATH, WEB_CRAWL_PATH, NELUBA_PATH]: | ||||||
|     if not os.path.exists(_path): |     if not os.path.exists(_path): | ||||||
|         os.mkdir(_path) |         os.makedirs(_path, exist_ok=True) | ||||||
| 
 | 
 | ||||||
| # 数据库默认存储路径。 | # 数据库默认存储路径。 | ||||||
| # 如果使用sqlite,可以直接修改DB_ROOT_PATH;如果使用其它数据库,请直接修改SQLALCHEMY_DATABASE_URI。 | # 如果使用sqlite,可以直接修改DB_ROOT_PATH;如果使用其它数据库,请直接修改SQLALCHEMY_DATABASE_URI。 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user