Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ lemmatizer = WordNetLemmatizer()
|
|
| 35 |
# Load models (cache them to avoid reloading on every interaction)
|
| 36 |
@st.cache_resource
|
| 37 |
def load_classification_model():
|
| 38 |
-
model_name = "
|
| 39 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 40 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 41 |
return pipeline("text-classification", model=model, tokenizer=tokenizer)
|
|
@@ -86,14 +86,14 @@ st.markdown("""
|
|
| 86 |
display: flex;
|
| 87 |
align-items: center;
|
| 88 |
margin-bottom: 20px;
|
| 89 |
-
|
| 90 |
}
|
| 91 |
.header img {
|
| 92 |
height: 50px;
|
| 93 |
margin-right: 10px;
|
| 94 |
}
|
| 95 |
.header h1 {
|
| 96 |
-
font-size:
|
| 97 |
color: #4CAF50;
|
| 98 |
margin: 0;
|
| 99 |
|
|
|
|
| 35 |
# Load models (cache them to avoid reloading on every interaction)
|
| 36 |
@st.cache_resource
|
| 37 |
def load_classification_model():
|
| 38 |
+
model_name = "Imasha17/News_classification.3" # Replace with your model path
|
| 39 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 40 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 41 |
return pipeline("text-classification", model=model, tokenizer=tokenizer)
|
|
|
|
| 86 |
display: flex;
|
| 87 |
align-items: center;
|
| 88 |
margin-bottom: 20px;
|
| 89 |
+
background-color: #2196F3;
|
| 90 |
}
|
| 91 |
.header img {
|
| 92 |
height: 50px;
|
| 93 |
margin-right: 10px;
|
| 94 |
}
|
| 95 |
.header h1 {
|
| 96 |
+
font-size: 40px;
|
| 97 |
color: #4CAF50;
|
| 98 |
margin: 0;
|
| 99 |
|