Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,9 @@ from huggingface_hub import login
|
|
4 |
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
|
5 |
from keybert import KeyBERT
|
6 |
|
|
|
|
|
|
|
7 |
# ─── Cached resource: Sentiment Analysis Pipeline ────────────────────────────
|
8 |
@st.cache_resource
|
9 |
def load_sentiment_pipeline():
|
@@ -33,7 +36,6 @@ def main():
|
|
33 |
sentiment_pipeline = load_sentiment_pipeline()
|
34 |
kw_model = load_keybert_model()
|
35 |
|
36 |
-
st.set_page_config(page_title="Review Analyzer", layout="wide")
|
37 |
st.title("📊 Review Sentiment & Keyword Analyzer")
|
38 |
|
39 |
review = st.text_area("Enter your review:")
|
|
|
4 |
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
|
5 |
from keybert import KeyBERT
|
6 |
|
7 |
+
# ─── Streamlit Page Config must be first Streamlit command ────────────────
|
8 |
+
st.set_page_config(page_title="Review Analyzer", layout="wide")
|
9 |
+
|
10 |
# ─── Cached resource: Sentiment Analysis Pipeline ────────────────────────────
|
11 |
@st.cache_resource
|
12 |
def load_sentiment_pipeline():
|
|
|
36 |
sentiment_pipeline = load_sentiment_pipeline()
|
37 |
kw_model = load_keybert_model()
|
38 |
|
|
|
39 |
st.title("📊 Review Sentiment & Keyword Analyzer")
|
40 |
|
41 |
review = st.text_area("Enter your review:")
|