Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,105 +1,112 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
| 25 |
-
|
|
| 26 |
-
|
|
| 27 |
-
|
|
| 28 |
-
|
|
| 29 |
-
|
|
| 30 |
-
|
|
| 31 |
-
|
|
| 32 |
-
|
|
| 33 |
-
|
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
| 38 |
-
|
|
| 39 |
-
|
|
| 40 |
-
|
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
##
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
**
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: HTS Review Tool
|
| 3 |
+
sdk: streamlit
|
| 4 |
+
emoji: 👀
|
| 5 |
+
colorFrom: blue
|
| 6 |
+
colorTo: green
|
| 7 |
+
---
|
| 8 |
+
# HTS Checker - Tariff Audit Tool
|
| 9 |
+
|
| 10 |
+
A Streamlit application for auditing HTS (Harmonized Tariff Schedule) codes, validating primary HTS against additional tariffs and description keywords.
|
| 11 |
+
|
| 12 |
+
## Features
|
| 13 |
+
|
| 14 |
+
- **Auto-validation**: Validation runs automatically when file is uploaded
|
| 15 |
+
- **14+ Scenarios**: Validates Steel, Aluminum, Copper tariff classifications
|
| 16 |
+
- **Unique Combinations View**: De-duplicates entries by HTS+Description for efficient review
|
| 17 |
+
- **Interactive Filters**: Filter by HTS, description, status, scenario
|
| 18 |
+
- **Bulk Export**: Add filtered results to cache and export to Excel
|
| 19 |
+
- **HTS Reference**: View all Steel/Aluminum/Copper HTS lists with overlap analysis
|
| 20 |
+
- **Editable Keywords**: Customize metal, aluminum, copper, zinc, plastics keyword lists
|
| 21 |
+
|
| 22 |
+
## Validation Scenarios
|
| 23 |
+
|
| 24 |
+
| ID | Description |
|
| 25 |
+
|----|-------------|
|
| 26 |
+
| S1 | Steel HTS + 232 tariff applied - verify 99030133 present, no 99030125 |
|
| 27 |
+
| S2 | Metal keyword but NOT steel HTS - should apply 99030125, no 232 tariffs |
|
| 28 |
+
| S3 | Steel HTS but NO metal keyword - description mismatch, should apply 99030125 |
|
| 29 |
+
| S4 | Aluminum HTS + 232 tariff applied - verify 99030133 present |
|
| 30 |
+
| S5 | Aluminum keyword but NOT aluminum HTS - should apply 99030125, no 232 tariffs |
|
| 31 |
+
| S6 | Aluminum HTS but NO aluminum keyword - description mismatch |
|
| 32 |
+
| S7 | Dual Steel+Aluminum HTS - matches keyword, apply corresponding 232 |
|
| 33 |
+
| S7a | Dual Steel+Aluminum HTS + BOTH keywords - flag for manual review |
|
| 34 |
+
| S8 | Dual Steel+Aluminum HTS + NO keywords - should apply 99030125 |
|
| 35 |
+
| S9 | Copper keyword but NOT copper HTS - potential misclassification |
|
| 36 |
+
| S10 | Copper HTS but NO copper keyword - description mismatch |
|
| 37 |
+
| S11 | Dual Aluminum+Copper HTS + copper keyword - apply 99030133 + copper tariffs |
|
| 38 |
+
| S12 | Dual Aluminum+Copper HTS + aluminum keyword - apply 99030133 + aluminum 232 |
|
| 39 |
+
| S13 | Zinc keyword - should ONLY apply 99030125, no 232 tariffs allowed |
|
| 40 |
+
| S14 | Plastics keyword + metal HTS - override, should ONLY apply 99030125 |
|
| 41 |
+
|
| 42 |
+
## Key Additional HTS Codes
|
| 43 |
+
|
| 44 |
+
| Code | Type |
|
| 45 |
+
|------|------|
|
| 46 |
+
| 99038190, 99038191 | Steel Section 232 |
|
| 47 |
+
| 99038507, 99038508 | Aluminum Section 232 |
|
| 48 |
+
| 99037801, 99037802 | Copper tariffs |
|
| 49 |
+
| 99030133 | General 301 (accompanies 232) |
|
| 50 |
+
| 99030125 | Mismatch/Override code |
|
| 51 |
+
|
| 52 |
+
## Input File Format
|
| 53 |
+
|
| 54 |
+
Upload Excel file with these columns:
|
| 55 |
+
- **Column E (Description)**: Product description for keyword matching
|
| 56 |
+
- **Column F (Tariff)**: 10-digit Primary HTS code
|
| 57 |
+
- **Columns I-N (Primary 1-6)**: Additional HTS codes applied
|
| 58 |
+
|
| 59 |
+
## Default Keywords
|
| 60 |
+
|
| 61 |
+
**Metal**: steel, stainless steel, carbon steel, iron, metal
|
| 62 |
+
|
| 63 |
+
**Aluminum**: aluminum, aluminium
|
| 64 |
+
|
| 65 |
+
**Copper**: copper
|
| 66 |
+
|
| 67 |
+
**Zinc**: zinc
|
| 68 |
+
|
| 69 |
+
**Plastics**: plastic, abs, pu, pvc, polyester, nylon
|
| 70 |
+
|
| 71 |
+
## Tabs
|
| 72 |
+
|
| 73 |
+
1. **Upload & Filter**: Upload Excel file, apply initial filters
|
| 74 |
+
2. **Validation Results**: View all results with interactive filters, add to export cache
|
| 75 |
+
3. **Unique Combinations**: De-duplicated view by HTS+Description with occurrence count
|
| 76 |
+
4. **Keyword Management**: Edit keyword lists used for validation
|
| 77 |
+
5. **Export Selection**: Manage export cache and download Excel reports
|
| 78 |
+
6. **HTS Reference**: View Steel/Aluminum/Copper HTS lists and overlaps
|
| 79 |
+
|
| 80 |
+
## Local Development
|
| 81 |
+
|
| 82 |
+
```bash
|
| 83 |
+
cd HTS_Checker
|
| 84 |
+
pip install -r requirements.txt
|
| 85 |
+
streamlit run app.py
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
## Hugging Face Deployment
|
| 89 |
+
|
| 90 |
+
1. Create a new Space on [Hugging Face](https://huggingface.co/spaces)
|
| 91 |
+
2. Select **Streamlit** as the SDK
|
| 92 |
+
3. Upload these files:
|
| 93 |
+
- `app.py`
|
| 94 |
+
- `hts_validator.py`
|
| 95 |
+
- `HTS_list.py`
|
| 96 |
+
- `requirements.txt`
|
| 97 |
+
4. The app will auto-deploy
|
| 98 |
+
|
| 99 |
+
## Files
|
| 100 |
+
|
| 101 |
+
| File | Description |
|
| 102 |
+
|------|-------------|
|
| 103 |
+
| `app.py` | Streamlit UI application |
|
| 104 |
+
| `hts_validator.py` | Core validation logic |
|
| 105 |
+
| `HTS_list.py` | Steel, Aluminum, Copper HTS code lists |
|
| 106 |
+
| `requirements.txt` | Python dependencies |
|
| 107 |
+
|
| 108 |
+
## Requirements
|
| 109 |
+
|
| 110 |
+
- streamlit
|
| 111 |
+
- pandas
|
| 112 |
+
- openpyxl
|