quoc-khanh commited on
Commit
1cf0c77
·
verified ·
1 Parent(s): 57c4bf5

Update helpers.py

Browse files
Files changed (1) hide show
  1. helpers.py +19 -3
helpers.py CHANGED
@@ -203,7 +203,7 @@ def define_metadata(input_text):
203
  'Hệ thống thông tin quản lý',
204
  'Hệ thống thông tin',
205
  'Định phí bảo hiểm và Quản trị rủi ro',
206
- 'Chương trình Công nghệ thông tin',
207
  'An toàn thông tin']
208
  #cond1 cond2 la str, con3 la list ten cac nganh
209
  result = {}
@@ -215,6 +215,22 @@ def define_metadata(input_text):
215
  result['Tai lieu ve'] = 'Đề án'
216
  for cond in condition4:
217
  if cond in input_text:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  result['Nganh'] = cond
219
  return result
220
 
@@ -406,9 +422,9 @@ def list_docx_files(folder_path):
406
  [str(file) for file in Path(folder_path).rglob("*.doc")]
407
 
408
  def prompt_order(queries):
409
- text = 'IMPORTANT: Here is the questions of user in order, use that and the context above to know the best answer:\n'
410
  i = 0
411
  for q in queries:
412
  i += 1
413
- text += f'Question {i}: {str(q)}\n'
414
  return text
 
203
  'Hệ thống thông tin quản lý',
204
  'Hệ thống thông tin',
205
  'Định phí bảo hiểm và Quản trị rủi ro',
206
+ 'Công nghệ thông tin',
207
  'An toàn thông tin']
208
  #cond1 cond2 la str, con3 la list ten cac nganh
209
  result = {}
 
215
  result['Tai lieu ve'] = 'Đề án'
216
  for cond in condition4:
217
  if cond in input_text:
218
+ if cond in ['An toàn thông tin', 'Công nghệ thông tin', 'Khoa học máy tính', 'Kỹ thuật phần mềm']:
219
+ result['Khoa'] = 'Công nghệ thông tin (FIT)'
220
+ if cond in ['Toán kinh tế', 'Phân tích dữ liệu trong Kinh tế', 'Định phí bảo hiểm và Quản trị rủi ro']:
221
+ result['Khoa'] = 'Toán Kinh tế (MFE)'
222
+ if cond == 'Toán kinh tế':
223
+ cond += ' (TOKT)'
224
+ if cond == 'Phân tích dữ liệu trong Kinh tế':
225
+ cond += ' (DSEB)'
226
+ if cond == 'Định phí bảo hiểm và Quản trị rủi ro':
227
+ cond += ' (Actuary)'
228
+ if cond in ['Khoa học dữ liệu', 'Trí tuệ nhân tạo']:
229
+ result['Khoa'] = 'Khoa học dữ liệu và Trí tuệ nhân tạo (FDA)'
230
+ if cond == 'Thống kê kinh tế':
231
+ result['Khoa'] = 'Thống kê'
232
+ if cond in ['Hệ thống thông tin', 'Hệ thống thông tin quản lý']:
233
+ result['Khoa'] = 'Hệ thống thông tin quản lý (MIS)'
234
  result['Nganh'] = cond
235
  return result
236
 
 
422
  [str(file) for file in Path(folder_path).rglob("*.doc")]
423
 
424
  def prompt_order(queries):
425
+ text = 'Dưới đây các câu hỏi của người dùng theo thời gian, hãy đưa ra đáp án tốt nhất:\n'
426
  i = 0
427
  for q in queries:
428
  i += 1
429
+ text += f'Câu hỏi {i}: {str(q)}\n'
430
  return text