Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,9 @@ if uploaded_file:
|
|
| 17 |
|
| 18 |
# Function to categorize
|
| 19 |
def categorize_expense(description):
|
|
|
|
| 20 |
result = classifier(description, candidate_labels=categories)
|
|
|
|
| 21 |
return result['labels'][0] # Most probable category
|
| 22 |
|
| 23 |
# Apply categorization
|
|
|
|
| 17 |
|
| 18 |
# Function to categorize
|
| 19 |
def categorize_expense(description):
|
| 20 |
+
# Check raw output from the model for debugging
|
| 21 |
result = classifier(description, candidate_labels=categories)
|
| 22 |
+
st.write(f"Raw classification result for '{description}': {result}") # Debugging line
|
| 23 |
return result['labels'][0] # Most probable category
|
| 24 |
|
| 25 |
# Apply categorization
|