Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ from langchain_groq import ChatGroq
|
|
| 14 |
def load_data():
|
| 15 |
|
| 16 |
retriever = BM25HF.load_from_hub(
|
| 17 |
-
"tien314/
|
| 18 |
return retriever
|
| 19 |
|
| 20 |
def load_model():
|
|
@@ -22,8 +22,8 @@ def load_model():
|
|
| 22 |
HumanMessagePromptTemplate.from_template(
|
| 23 |
f"""
|
| 24 |
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.
|
| 25 |
-
Only return the HS Code as a
|
| 26 |
-
Example:
|
| 27 |
Context: {{context}}
|
| 28 |
Description: {{description}}
|
| 29 |
Answer:
|
|
|
|
| 14 |
def load_data():
|
| 15 |
|
| 16 |
retriever = BM25HF.load_from_hub(
|
| 17 |
+
"tien314/hscode6", load_corpus=True, mmap=True)
|
| 18 |
return retriever
|
| 19 |
|
| 20 |
def load_model():
|
|
|
|
| 22 |
HumanMessagePromptTemplate.from_template(
|
| 23 |
f"""
|
| 24 |
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.
|
| 25 |
+
Only return the HS Code as a 6-digit number .
|
| 26 |
+
Example: 123456
|
| 27 |
Context: {{context}}
|
| 28 |
Description: {{description}}
|
| 29 |
Answer:
|