Commit
•
45f0ebb
1
Parent(s):
bc5bb7e
removing misc class
Browse files
app.py
CHANGED
@@ -58,7 +58,7 @@ def preprocess(text):
|
|
58 |
cleaned_text = cleaned_text.upper()
|
59 |
|
60 |
# Remove unwanted words
|
61 |
-
words_to_remove = ["MPS", "POS", "BIL", "ONL", "BANGALORE", "PVT", "LTD", "INDIA", "LT"]
|
62 |
cleaned_text = " ".join([word for word in cleaned_text.split() if word not in words_to_remove])
|
63 |
|
64 |
# Convert to lowercase
|
@@ -79,17 +79,17 @@ output = gr.Label(label="Output")
|
|
79 |
|
80 |
#example object
|
81 |
transactions_and_tags = [
|
82 |
-
["MPS/TRUFFLES/202303261700/034587/Bangalore", "Medical, Food, Shopping, Subscription, Travel
|
83 |
-
["MPS/TACO BELL/202304012247/108300/BANGALORE", "Medical, Food, Shopping, Subscription, Travel
|
84 |
-
["POS XXXXXXXXXXXX0001 APOLLO PHARMACY", "Medical, Food, Shopping, Subscription, Travel
|
85 |
-
["BIL/ONL/000471093694/1MG Techno/X7ZRUSVLURFQZO", "Medical, Food, Shopping, Subscription, Travel
|
86 |
-
["POS XXXXXXXXXXXX1111 DECATHLON SPORTS", "Medical, Food, Shopping, Subscription, Travel
|
87 |
-
["POS XXXXXXXXXXXX1111 IKEA INDIA PVT L", "Medical, Food, Shopping, Subscription, Travel
|
88 |
-
["POS XXXXXXXXXXXX1111 WWW AMAZON IN", "Medical, Food, Shopping, Subscription, Travel
|
89 |
-
["ME DC SI XXXXXXXXXXXX1111 SPOTIFY SI", "Medical, Food, Shopping, Subscription, Travel
|
90 |
-
["POS/NETFLIX/1140920002/100623/17:25", "Medical, Food, Shopping, Subscription, Travel
|
91 |
-
["POS XXXXXXXXXXXX1110 MAKEMYTRIP INDIA", "Medical, Food, Shopping, Subscription, Travel
|
92 |
-
["BIL/ONL/000691178015/IRCTC Serv/XZZBX91LTCY1AZ", "Medical, Food, Shopping, Subscription, Travel
|
93 |
]
|
94 |
|
95 |
#create interface
|
|
|
58 |
cleaned_text = cleaned_text.upper()
|
59 |
|
60 |
# Remove unwanted words
|
61 |
+
words_to_remove = ["MPS", "POS", "BIL", "ONL", "BANGALORE", "PVT", "LTD", "INDIA", "LT", "xxxxxxxxxxxx"]
|
62 |
cleaned_text = " ".join([word for word in cleaned_text.split() if word not in words_to_remove])
|
63 |
|
64 |
# Convert to lowercase
|
|
|
79 |
|
80 |
#example object
|
81 |
transactions_and_tags = [
|
82 |
+
["MPS/TRUFFLES/202303261700/034587/Bangalore", "Medical, Food, Shopping, Subscription, Travel"],
|
83 |
+
["MPS/TACO BELL/202304012247/108300/BANGALORE", "Medical, Food, Shopping, Subscription, Travel"],
|
84 |
+
["POS XXXXXXXXXXXX0001 APOLLO PHARMACY", "Medical, Food, Shopping, Subscription, Travel"],
|
85 |
+
["BIL/ONL/000471093694/1MG Techno/X7ZRUSVLURFQZO", "Medical, Food, Shopping, Subscription, Travel"],
|
86 |
+
["POS XXXXXXXXXXXX1111 DECATHLON SPORTS", "Medical, Food, Shopping, Subscription, Travel"],
|
87 |
+
["POS XXXXXXXXXXXX1111 IKEA INDIA PVT L", "Medical, Food, Shopping, Subscription, Travel"],
|
88 |
+
["POS XXXXXXXXXXXX1111 WWW AMAZON IN", "Medical, Food, Shopping, Subscription, Travel"],
|
89 |
+
["ME DC SI XXXXXXXXXXXX1111 SPOTIFY SI", "Medical, Food, Shopping, Subscription, Travel"],
|
90 |
+
["POS/NETFLIX/1140920002/100623/17:25", "Medical, Food, Shopping, Subscription, Travel"],
|
91 |
+
["POS XXXXXXXXXXXX1110 MAKEMYTRIP INDIA", "Medical, Food, Shopping, Subscription, Travel"],
|
92 |
+
["BIL/ONL/000691178015/IRCTC Serv/XZZBX91LTCY1AZ", "Medical, Food, Shopping, Subscription, Travel"]
|
93 |
]
|
94 |
|
95 |
#create interface
|