Spaces:
Runtime error
Runtime error
Commit ·
0a02c34
1
Parent(s): d6df412
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,8 +48,8 @@ def prepare_catalog():
|
|
| 48 |
# Your existing decision function
|
| 49 |
def decision(user_input, type, catalog, product_name_catalog):
|
| 50 |
# Initialize the model
|
| 51 |
-
pipe_detect = pipeline("text-classification", model="matthewfarant/indobert-fertilizer-classifier", token = '
|
| 52 |
-
pipe_match = pipeline("text-classification", model="matthewfarant/indobert-fertilizer-matching", token = '
|
| 53 |
|
| 54 |
# Extract formula
|
| 55 |
user_input_formula = re.findall(r'\d{1,2}\s*[- ]\s*\d{1,2}\s*[- ]\s*\d{1,2}', user_input)
|
|
|
|
| 48 |
# Your existing decision function
|
| 49 |
def decision(user_input, type, catalog, product_name_catalog):
|
| 50 |
# Initialize the model
|
| 51 |
+
pipe_detect = pipeline("text-classification", model="matthewfarant/indobert-fertilizer-classifier", token = os.getenv('HF_MY_TOKEN'))
|
| 52 |
+
pipe_match = pipeline("text-classification", model="matthewfarant/indobert-fertilizer-matching", token = os.getenv('HF_MY_TOKEN'))
|
| 53 |
|
| 54 |
# Extract formula
|
| 55 |
user_input_formula = re.findall(r'\d{1,2}\s*[- ]\s*\d{1,2}\s*[- ]\s*\d{1,2}', user_input)
|