Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,12 @@ import pandas as pd
|
|
3 |
import re
|
4 |
import io
|
5 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
# Load fine-tuned model and tokenizer
|
8 |
model_name = "TAgroup5/news-classification-model"
|
|
|
3 |
import re
|
4 |
import io
|
5 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
|
6 |
+
from nltk.tokenize import word_tokenize
|
7 |
+
import nltk
|
8 |
+
|
9 |
+
# Ensure required NLTK resources are available
|
10 |
+
nltk.download('punkt')
|
11 |
+
|
12 |
|
13 |
# Load fine-tuned model and tokenizer
|
14 |
model_name = "TAgroup5/news-classification-model"
|