Update app.py
Browse files
app.py
CHANGED
|
@@ -222,8 +222,15 @@ class NewsGroupsDataLoader:
|
|
| 222 |
all_labels = list(train_data['label']) + list(test_data['label'])
|
| 223 |
|
| 224 |
# Get category names from dataset features
|
| 225 |
-
self.categories =
|
| 226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
logger.info(f"Total documents: {len(all_texts)}")
|
| 228 |
logger.info(f"Number of categories: {len(self.categories)}")
|
| 229 |
logger.info(f"Categories: {self.categories}")
|
|
|
|
| 222 |
all_labels = list(train_data['label']) + list(test_data['label'])
|
| 223 |
|
| 224 |
# Get category names from dataset features
|
| 225 |
+
self.categories = [
|
| 226 |
+
'alt.atheism', 'comp.graphics', 'comp.os.ms-windows.misc',
|
| 227 |
+
'comp.sys.ibm.pc.hardware', 'comp.sys.mac.hardware', 'comp.windows.x',
|
| 228 |
+
'misc.forsale', 'rec.autos', 'rec.motorcycles', 'rec.sport.baseball',
|
| 229 |
+
'rec.sport.hockey', 'sci.crypt', 'sci.electronics', 'sci.med',
|
| 230 |
+
'sci.space', 'soc.religion.christian', 'talk.politics.guns',
|
| 231 |
+
'talk.politics.mideast', 'talk.politics.misc', 'talk.religion.misc'
|
| 232 |
+
]
|
| 233 |
+
|
| 234 |
logger.info(f"Total documents: {len(all_texts)}")
|
| 235 |
logger.info(f"Number of categories: {len(self.categories)}")
|
| 236 |
logger.info(f"Categories: {self.categories}")
|