hanantonio commited on
Commit
4a9a3c2
·
verified ·
1 Parent(s): d6da013

Upload 10 files

Browse files
.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

  • SHA256: c55f017be60f34e19781b91df4e54514a7297c3276b9891f330fdcc5c2edac4d
  • Pointer size: 131 Bytes
  • Size of remote file: 184 kB
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

  • SHA256: d9b39ba3010de35693cdfb431d6208c4fb6ba78d7aadfeb8891a9e421eea02cb
  • Pointer size: 131 Bytes
  • Size of remote file: 164 kB
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
- 1: "meal and entertainment service",
98
- 2: "refund, cancellation, and booking tickets policy",
99
- 3: "business class/premium facility",
100
- 4: "baggage limits and price",
101
- 5: "hidden charges"
 
 
 
 
 
102
  }
103
 
104
  topic_labels_pos = {
105
- 1: "good food and crew service",
106
- 2: "excellent economy seat",
107
- 3: "refund and cancellation policy",
108
- 4: "meals quality",
109
- 5: "accommodation and assistance"
 
 
 
 
 
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)) + 1
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)) + 1
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