Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 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
|
| 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:
|