Upload 10 files
Browse files- .gitattributes +2 -0
- src/Negative - Top Activity Over Time 10.png +3 -0
- src/Negative - Top Weights 10.png +0 -0
- src/Negative - Top Words Distributions 10.png +0 -0
- src/Positive - Top Words Distributions 10.png +0 -0
- src/Positive - Topic Activities Over Time 10.png +3 -0
- src/eda.py +6 -6
- src/fastopic_negative_model_10.pkl +3 -0
- src/fastopic_positive_model_10.pkl +3 -0
- src/prediction_compile.py +22 -12
.gitattributes
CHANGED
|
@@ -41,3 +41,5 @@ src/src/Negative[[:space:]]-[[:space:]]Topic[[:space:]]Activities[[:space:]]Over
|
|
| 41 |
src/src/Positive[[:space:]]-[[:space:]]Topic[[:space:]]Activities[[:space:]]Over[[:space:]]Time.png filter=lfs diff=lfs merge=lfs -text
|
| 42 |
src/Negative[[:space:]]-[[:space:]]Wordcloud.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
src/Positive[[:space:]]-[[:space:]]Wordcloud.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 41 |
src/src/Positive[[:space:]]-[[:space:]]Topic[[:space:]]Activities[[:space:]]Over[[:space:]]Time.png filter=lfs diff=lfs merge=lfs -text
|
| 42 |
src/Negative[[:space:]]-[[:space:]]Wordcloud.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
src/Positive[[:space:]]-[[:space:]]Wordcloud.png filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
src/Negative[[:space:]]-[[:space:]]Top[[:space:]]Activity[[:space:]]Over[[:space:]]Time[[:space:]]10.png filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
src/Positive[[:space:]]-[[:space:]]Topic[[:space:]]Activities[[:space:]]Over[[:space:]]Time[[:space:]]10.png filter=lfs diff=lfs merge=lfs -text
|
src/Negative - Top Activity Over Time 10.png
ADDED
|
Git LFS Details
|
src/Negative - Top Weights 10.png
ADDED
|
src/Negative - Top Words Distributions 10.png
ADDED
|
src/Positive - Top Words Distributions 10.png
ADDED
|
src/Positive - Topic Activities Over Time 10.png
ADDED
|
Git LFS Details
|
src/eda.py
CHANGED
|
@@ -74,18 +74,18 @@ def run():
|
|
| 74 |
st.write("## Topic Modeling Results")
|
| 75 |
col1, col2 = st.columns(2)
|
| 76 |
with col1:
|
| 77 |
-
st.image(os.path.join(BASE_DIR, "Negative - Top Words Distributions.png"), caption="Negative - Top Words Distributions")
|
| 78 |
with col2:
|
| 79 |
-
st.image(os.path.join(BASE_DIR, "Positive - Top Words Distributions.png"), caption="Positive - Top Words Distributions")
|
| 80 |
|
| 81 |
col1, col2 = st.columns(2)
|
| 82 |
with col1:
|
| 83 |
-
st.image(os.path.join(BASE_DIR, "Negative - Topic Activities Over Time.png"), caption="Negative - Topic Activities Over Time")
|
| 84 |
with col2:
|
| 85 |
-
st.image(os.path.join(BASE_DIR, "Positive - Topic Activities Over Time.png"), caption="Positive - Topic Activities Over Time")
|
| 86 |
|
| 87 |
col1, col2 = st.columns(2)
|
| 88 |
with col1:
|
| 89 |
-
st.image(os.path.join(BASE_DIR, "Negative - Topics Weights.png"), caption="Negative - Topics Weights")
|
| 90 |
with col2:
|
| 91 |
-
st.image(os.path.join(BASE_DIR, "Positive - Topics Weights.png"), caption="Positive - Topics Weights")
|
|
|
|
| 74 |
st.write("## Topic Modeling Results")
|
| 75 |
col1, col2 = st.columns(2)
|
| 76 |
with col1:
|
| 77 |
+
st.image(os.path.join(BASE_DIR, "Negative - Top Words Distributions 10.png"), caption="Negative - Top Words Distributions")
|
| 78 |
with col2:
|
| 79 |
+
st.image(os.path.join(BASE_DIR, "Positive - Top Words Distributions 10.png"), caption="Positive - Top Words Distributions")
|
| 80 |
|
| 81 |
col1, col2 = st.columns(2)
|
| 82 |
with col1:
|
| 83 |
+
st.image(os.path.join(BASE_DIR, "Negative - Topic Activities Over Time 10.png"), caption="Negative - Topic Activities Over Time")
|
| 84 |
with col2:
|
| 85 |
+
st.image(os.path.join(BASE_DIR, "Positive - Topic Activities Over Time 10.png"), caption="Positive - Topic Activities Over Time")
|
| 86 |
|
| 87 |
col1, col2 = st.columns(2)
|
| 88 |
with col1:
|
| 89 |
+
st.image(os.path.join(BASE_DIR, "Negative - Topics Weights 10.png"), caption="Negative - Topics Weights")
|
| 90 |
with col2:
|
| 91 |
+
st.image(os.path.join(BASE_DIR, "Positive - Topics Weights 10.png"), caption="Positive - Topics Weights")
|
src/fastopic_negative_model_10.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4da14366fd0678b0befbc3e2cf3340dc9568981e56f402c8f95ca5ca4f01511
|
| 3 |
+
size 114569213
|
src/fastopic_positive_model_10.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a9f18982fee97966b9229a9dbd37545409061dba4122d87e4a4cab2c051a4fca
|
| 3 |
+
size 124939691
|
src/prediction_compile.py
CHANGED
|
@@ -94,19 +94,29 @@ def text_preprocessing(text):
|
|
| 94 |
|
| 95 |
# --- Topic Labels ---
|
| 96 |
topic_labels_neg = {
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
}
|
| 103 |
|
| 104 |
topic_labels_pos = {
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
}
|
| 111 |
|
| 112 |
# --- Streamlit App ---
|
|
@@ -190,12 +200,12 @@ def run():
|
|
| 190 |
st.write("### Topic Modeling")
|
| 191 |
if sentiment_label == "Negative":
|
| 192 |
probs = topic_model_neg.transform([text])[0]
|
| 193 |
-
topic_id = int(np.argmax(probs))
|
| 194 |
topic_name = topic_labels_neg.get(topic_id, "Unknown Topic")
|
| 195 |
st.write("**Using Negative Model**")
|
| 196 |
else:
|
| 197 |
probs = topic_model_pos.transform([text])[0]
|
| 198 |
-
topic_id = int(np.argmax(probs))
|
| 199 |
topic_name = topic_labels_pos.get(topic_id, "Unknown Topic")
|
| 200 |
st.write("**Using Positive Model**")
|
| 201 |
|
|
|
|
| 94 |
|
| 95 |
# --- Topic Labels ---
|
| 96 |
topic_labels_neg = {
|
| 97 |
+
0: "Service Attitude",
|
| 98 |
+
1: "Ticket Price",
|
| 99 |
+
2: "In-Flight Accommodation",
|
| 100 |
+
3: "Boarding & Luggage Issues",
|
| 101 |
+
4: "Refund & Payment Difficulties",
|
| 102 |
+
5: "Meal Quality",
|
| 103 |
+
6: "Accessibility & Assistance",
|
| 104 |
+
7: "Safety & Hygiene",
|
| 105 |
+
8: "Seat Comfort",
|
| 106 |
+
9: "Quality of Amenities"
|
| 107 |
}
|
| 108 |
|
| 109 |
topic_labels_pos = {
|
| 110 |
+
0: "Destination-based compliment",
|
| 111 |
+
1: "Seat & cabin comfort",
|
| 112 |
+
2: "Destination-based compliment",
|
| 113 |
+
3: "Transit accommodation",
|
| 114 |
+
4: "Meals & in-flight services",
|
| 115 |
+
5: "Meals & in-flight services",
|
| 116 |
+
6: "Seat & cabin comfort / Aircraft condition",
|
| 117 |
+
7: "Destination-based compliment",
|
| 118 |
+
8: "Miscellaneous experiences",
|
| 119 |
+
9: "Destination-based compliment"
|
| 120 |
}
|
| 121 |
|
| 122 |
# --- Streamlit App ---
|
|
|
|
| 200 |
st.write("### Topic Modeling")
|
| 201 |
if sentiment_label == "Negative":
|
| 202 |
probs = topic_model_neg.transform([text])[0]
|
| 203 |
+
topic_id = int(np.argmax(probs))
|
| 204 |
topic_name = topic_labels_neg.get(topic_id, "Unknown Topic")
|
| 205 |
st.write("**Using Negative Model**")
|
| 206 |
else:
|
| 207 |
probs = topic_model_pos.transform([text])[0]
|
| 208 |
+
topic_id = int(np.argmax(probs))
|
| 209 |
topic_name = topic_labels_pos.get(topic_id, "Unknown Topic")
|
| 210 |
st.write("**Using Positive Model**")
|
| 211 |
|