tien314 commited on
Commit
d0a4cfc
·
verified ·
1 Parent(s): 3956fff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -63,7 +63,7 @@ def load_model():
63
  prompt = ChatPromptTemplate.from_messages([
64
  HumanMessagePromptTemplate.from_template(
65
  f"""
66
- Extract the appropriate 8-digit HS Code base on the product description and retrieved document by thoroughly analyzing its details and utilizing a reliable and up-to-date HS Code database for accurate results.
67
  Only return the HS Code as a 6-digit number .
68
  Example: 123456
69
  Context: {{context}}
@@ -87,7 +87,7 @@ def process_input(sentence):
87
  docs, _ = st.session_state.retriever.retrieve(bm25s.tokenize(sentence), k=15)
88
  documents =[]
89
  for doc in docs[0]:
90
- documents.append(Document(doc['text']))
91
  return documents
92
 
93
  if 'retriever' not in st.session_state:
 
63
  prompt = ChatPromptTemplate.from_messages([
64
  HumanMessagePromptTemplate.from_template(
65
  f"""
66
+ Extract the appropriate 6-digit HS Code base on the product description and retrieved document by thoroughly analyzing its details and utilizing a reliable and up-to-date HS Code database for accurate results.
67
  Only return the HS Code as a 6-digit number .
68
  Example: 123456
69
  Context: {{context}}
 
87
  docs, _ = st.session_state.retriever.retrieve(bm25s.tokenize(sentence), k=15)
88
  documents =[]
89
  for doc in docs[0]:
90
+ documents.append(Document(doc))
91
  return documents
92
 
93
  if 'retriever' not in st.session_state: