Truong-Phuc Nguyen commited on
Commit
232a998
1 Parent(s): 2a63310

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -20,7 +20,7 @@ context = st.sidebar.text_area(label='Nội dung văn bản pháp luật Việt
20
  device = 0 if torch.cuda.is_available() else -1
21
  if 'model' not in st.session_state:
22
  print('Some errors occurred!')
23
- st.session_state.model = pipeline("question-answering", model='./models/', device=device)
24
 
25
  def get_answer(context, question):
26
  return st.session_state.model(context=context, question=question, max_answer_len=512)
 
20
  device = 0 if torch.cuda.is_available() else -1
21
  if 'model' not in st.session_state:
22
  print('Some errors occurred!')
23
+ st.session_state.model = pipeline("question-answering", model='./model/', device=device)
24
 
25
  def get_answer(context, question):
26
  return st.session_state.model(context=context, question=question, max_answer_len=512)