Kim Adams commited on
Commit
b74a846
·
1 Parent(s): f18ca41

embeddings

Browse files
app.py CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import Repository
4
  from io import BytesIO
5
  from dotenv import load_dotenv
6
  from openai.embeddings_utils import get_embedding, cosine_similarity
7
- from slack_processing.slack_data_prep import FetchSlack, ProcessSlack
8
  ##from ml_to_nl_translation.translation import getTranslations, getJSONDF
9
  #from lookups.translate_pdf_to_text import PreparePDF
10
  #from lookups.create_searchable_content import CreateSearchableContent
@@ -22,18 +22,19 @@ voice_id = api_keys.APIKeys().get_key('VOICE_ID')
22
 
23
  def FetchSlackJSON():
24
  result=FetchSlack()
25
- print("slack result")
26
  print (result)
27
  return result
28
 
29
  def InitProcess():
30
  result=ProcessSlack()
31
- print("slack result")
32
  print (result)
33
  return result
34
 
35
- def fetch_json_df():
36
- #result = getJSONDF()
 
37
  print(result)
38
  return result
39
 
@@ -64,19 +65,19 @@ with gr.Blocks() as ui2:
64
 
65
  with gr.Blocks() as ui3:
66
  with gr.Row():
67
- b3 = gr.Button("Pull Reference")
68
  with gr.Row():
69
  with gr.Column(scale=1, min_width=600):
70
- df3 =gr.HTML()
71
- b3.click(fetch_reference,outputs=df3)
72
 
73
  with gr.Blocks() as ui4:
74
  with gr.Row():
75
- b4 = gr.Button("Create Searchable Content")
76
  with gr.Row():
77
  with gr.Column(scale=1, min_width=600):
78
  df4 =gr.Dataframe(type="pandas")
79
  b4.click(fetch_content,outputs=df4)
80
 
81
- demo = gr.TabbedInterface([ui1,ui2,ui3,ui4], ("Fetch Slack", "Process & Tag", "Sort Topics by People","Create Embeddings"))
82
  demo.launch()
 
4
  from io import BytesIO
5
  from dotenv import load_dotenv
6
  from openai.embeddings_utils import get_embedding, cosine_similarity
7
+ from slack_processing.slack_data_prep import FetchSlack, ProcessSlack, CreateEmbeddings
8
  ##from ml_to_nl_translation.translation import getTranslations, getJSONDF
9
  #from lookups.translate_pdf_to_text import PreparePDF
10
  #from lookups.create_searchable_content import CreateSearchableContent
 
22
 
23
  def FetchSlackJSON():
24
  result=FetchSlack()
25
+ print("slack fetch")
26
  print (result)
27
  return result
28
 
29
  def InitProcess():
30
  result=ProcessSlack()
31
+ print("slack processed")
32
  print (result)
33
  return result
34
 
35
+ def FetchEmbeddings():
36
+ result = CreateEmbeddings()
37
+ print("fetch embeddings")
38
  print(result)
39
  return result
40
 
 
65
 
66
  with gr.Blocks() as ui3:
67
  with gr.Row():
68
+ b3 = gr.Button("Create Embeddings")
69
  with gr.Row():
70
  with gr.Column(scale=1, min_width=600):
71
+ df3 =gr.Dataframe(type="pandas")
72
+ b3.click(FetchEmbeddings,outputs=df3)
73
 
74
  with gr.Blocks() as ui4:
75
  with gr.Row():
76
+ b4 = gr.Button("Find Games")
77
  with gr.Row():
78
  with gr.Column(scale=1, min_width=600):
79
  df4 =gr.Dataframe(type="pandas")
80
  b4.click(fetch_content,outputs=df4)
81
 
82
+ demo = gr.TabbedInterface([ui1,ui2,ui3,ui4], ("Fetch Slack", "Process & Tag", "Create Embeddings", "Find Games"))
83
  demo.launch()
slack_processing/__pycache__/slack_data_prep.cpython-311.pyc CHANGED
Binary files a/slack_processing/__pycache__/slack_data_prep.cpython-311.pyc and b/slack_processing/__pycache__/slack_data_prep.cpython-311.pyc differ
 
slack_processing/data/slack_with_theme_embeddings.json ADDED
The diff for this file is too large to render. See raw diff
 
slack_processing/data/themes.json CHANGED
@@ -1,5 +1,6 @@
1
  [
2
  {
 
3
  "theme": "D&D Campaign",
4
  "modifier": 0.0,
5
  "message": "IMPORTANT ADDITION You do NOT need ANY experience or knowledge of D&D to join the one-shot campaign. R2 will walk you through everything you need to know. Don't be shy and join us! (edited)",
@@ -8,6 +9,7 @@
8
  "themeSimilarity": 1.0
9
  },
10
  {
 
11
  "theme": "Availability",
12
  "modifier": 1.0,
13
  "message": "After the summer then I will be more available.",
@@ -16,6 +18,7 @@
16
  "themeSimilarity": 1.0
17
  },
18
  {
 
19
  "theme": "Meeting",
20
  "modifier": 0.0,
21
  "message": "@here L&L starting in 5 mins. If you are in the office Feel free to come to RICE. AI Tutoring Paving the Way to Better Tomorrows in Education\nhttps//teams.microsoft.com/l/meetup-join/19%3ameeting_MTg2OWRkYzgtYTdmOS00NTk4LWE4MmQ[\u2026]2c%22Oid%22%3a%22bca811aa-1982-4f3b-b602-bca1a89180dc%22%7d",
@@ -24,6 +27,7 @@
24
  "themeSimilarity": 1.0
25
  },
26
  {
 
27
  "theme": "Celebration",
28
  "modifier": 10.0,
29
  "message": "It's @Sam \u2019s 2 year Slalomversary. Sam it's been a pleasure to be on a team with you and thanks for everything you do at _build especially around the ERGs. Congratulations!",
@@ -32,6 +36,7 @@
32
  "themeSimilarity": 1.0
33
  },
34
  {
 
35
  "theme": "Celebration",
36
  "modifier": 0.0,
37
  "message": "Happy Slalomversary my dear friend! @Sam hugging_face",
@@ -40,6 +45,7 @@
40
  "themeSimilarity": 1.0
41
  },
42
  {
 
43
  "theme": "Maintenance",
44
  "modifier": 0.0,
45
  "message": "FYI at 330 today I'll be taking the Arcade machine down for maintenance. It will actually remain down until next Wednesday morning as I work through some marquee configuration. dealwithit",
@@ -48,6 +54,7 @@
48
  "themeSimilarity": 1.0
49
  },
50
  {
 
51
  "theme": "Appreciation",
52
  "modifier": 0.0,
53
  "message": "Thank you to everyone who came into the office yesterday in support of our Build Center tour for Woodside Energy and AWS. Special thanks to @Christy Nolan and @Danny Weldon for their support presenting \u201chow we work\u201d and \u201cwhat we\u2019re working on\u201d. We\u2019re well positioned to win work with the buyer at Woodside stating \u201cseveral consulting companies have pitched to me but nobody aligns better with my vision than Slalom does\u201d.",
@@ -56,6 +63,7 @@
56
  "themeSimilarity": 1.0
57
  },
58
  {
 
59
  "theme": "Time Sheets",
60
  "modifier": 0.0,
61
  "message": "Reminder Time sheets!",
@@ -64,6 +72,7 @@
64
  "themeSimilarity": 1.0
65
  },
66
  {
 
67
  "theme": "Date Night",
68
  "modifier": 0.0,
69
  "message": "Date night with my wife at the Sugar Land Space Cowboys game.",
@@ -72,6 +81,7 @@
72
  "themeSimilarity": 1.0
73
  },
74
  {
 
75
  "theme": "Father'S Day",
76
  "modifier": 0.0,
77
  "message": "Happy Father's day to all you _Builder Dads out there!",
@@ -80,6 +90,16 @@
80
  "themeSimilarity": 1.0
81
  },
82
  {
 
 
 
 
 
 
 
 
 
 
83
  "theme": "Cow Appreciation",
84
  "modifier": 7.0,
85
  "message": "National Cow Appreciation Day - @julie.lowe how are the cows? slightly_smiling_face cow",
@@ -88,6 +108,7 @@
88
  "themeSimilarity": 1.0
89
  },
90
  {
 
91
  "theme": "Sunburn",
92
  "modifier": 0.0,
93
  "message": "I applied sunscreen poorly and have stripes of sunburn....",
@@ -96,6 +117,7 @@
96
  "themeSimilarity": 1.0
97
  },
98
  {
 
99
  "theme": "Gift",
100
  "modifier": 0.0,
101
  "message": "My 3 year old daughter went to GAP and selected a flower print shirt for my husband - Nishank (I have never seen him wear flower print till yesterday). She also bought candy 'to share'.",
@@ -104,6 +126,7 @@
104
  "themeSimilarity": 1.0
105
  },
106
  {
 
107
  "theme": "Lunch Order",
108
  "modifier": 0.0,
109
  "message": "@channel Who's going in on Wednesday!? For lunch We will be having lunch from Bellagreen. If want lunch please drop a lunch-bag by EOD today. This will help me determine how much to order! Thank youbuild_heart Options Below comes with chips and fresh fruit...",
@@ -112,6 +135,7 @@
112
  "themeSimilarity": 1.0
113
  },
114
  {
 
115
  "theme": "Build Center",
116
  "modifier": NaN,
117
  "message": "@channel Also happening on Wednesday is the Woodside Build Center Tour beginning at 9am. I would like to have as many Builders in the office as possible. Please make every effort to be on-site. Thank you.",
@@ -120,6 +144,7 @@
120
  "themeSimilarity": 1.0
121
  },
122
  {
 
123
  "theme": "Etiquette",
124
  "modifier": 0.0,
125
  "message": "how to tell someone sitting behind you chewing ice from a solo cup that it is really on your nerves? - asking for a friend",
@@ -128,6 +153,7 @@
128
  "themeSimilarity": 1.0
129
  },
130
  {
 
131
  "theme": "Meeting",
132
  "modifier": 0.0,
133
  "message": "@here Good morning everyone! We are having our CCC today in the rice room from 900-1000am!",
@@ -136,6 +162,7 @@
136
  "themeSimilarity": 1.0
137
  },
138
  {
 
139
  "theme": "Technical Issue",
140
  "modifier": 0.0,
141
  "message": "Is anyone else getting signed out of their sessions from one day to the next? My Chrome tab that had a sharepoint open logged me out my Salesforce link logged out... Anyone else?",
@@ -144,6 +171,7 @@
144
  "themeSimilarity": 1.0
145
  },
146
  {
 
147
  "theme": "Found",
148
  "modifier": 0.0,
149
  "message": "UPDATE They've been found! Thank you @Alexa De La Garza and @Josh Mascorro meow_heart If anyone sees/saw the wine bottles I won from the auction for Target Hunger can you please put them by Melanie\u2019s desk melting_face I think I left them by Rice where we were having karaoke or maybe even by the elevators.",
@@ -152,6 +180,7 @@
152
  "themeSimilarity": 1.0
153
  },
154
  {
 
155
  "theme": "Bake Off",
156
  "modifier": 0.0,
157
  "message": "@here alert-bluecalling all bakers!! Want to show off your skills & take on a challenge to be titled the best baker in the Houston Build Center?? Then enter The Great Build Bake Off!! chefkissblob-birthdaycakefirst_place_medalblobwhee We are doing Cakes this roundblob-birthdaycake! Sign up HERE & bring your best slices on Wednesday June 14th. More deets below point_down Please be sure to pre-cut the cake into bite-size before the judging There will be a People\u2019s Choice and Judges\u2019 Choice as winners You do not need to be present during the judging time to enter. Bakeoff (2).png",
@@ -160,6 +189,7 @@
160
  "themeSimilarity": 1.0
161
  },
162
  {
 
163
  "theme": "Parking Validation",
164
  "modifier": 0.0,
165
  "message": "@here Hello folks! B.R.A.D is working again if anyone in the office needs parking validation brad-badgeblue_car",
@@ -168,6 +198,7 @@
168
  "themeSimilarity": 1.0
169
  },
170
  {
 
171
  "theme": "Severe Storms",
172
  "modifier": 1.0,
173
  "message": "Severe T storms just hit Northside. High winds torrential downpour and the traditional ceremonial power outage.",
@@ -176,6 +207,7 @@
176
  "themeSimilarity": 1.0
177
  },
178
  {
 
179
  "theme": "Safety",
180
  "modifier": 0.0,
181
  "message": "Be safe!",
@@ -184,14 +216,7 @@
184
  "themeSimilarity": 1.0
185
  },
186
  {
187
- "theme": "Recipe",
188
- "modifier": 0.0,
189
- "message": "I call this \"lights-out grilled chicken nachos\"",
190
- "person": "jmoney",
191
- "postId": 37,
192
- "themeSimilarity": 1.0
193
- },
194
- {
195
  "theme": "Lunch Order",
196
  "modifier": 6.0,
197
  "message": "@here Who's going in on Wednesday!? We will be having Tacos from Velvet Taco. If want lunch please drop a taco by EOD todayalert0. This will help me determine how much to order! Thank you build_heart Buffalo Chicken - crisp tenders house buffalo sauce danish bleu cheese ranch crema carrots micro celery flour tortilla Picnic chicken - rotisserie chicken avocado crema warm honey-dijon potato salad crispy chicken skin cilantro flour tortilla Mediterranean mushroom - grilled portobello mushrooms french fries cucumber grilled heirloom tomatoes dill flour tortilla - Vegan Grilled salmon - napa slaw citrus lime crema pickled fresnos roasted corn pico avocado crema micro cilantro corn tortilla Side Elote & chips- queso listo Valentina citrus lime crema queso fresco lime (edited)",
@@ -200,6 +225,7 @@
200
  "themeSimilarity": 1.0
201
  },
202
  {
 
203
  "theme": "Hackathon",
204
  "modifier": 0.0,
205
  "message": "@here aiHey HOU Build the second Hackathon Subject Matter Expert Series hosted by Carrick Carpenter Miles Erickson and Etienne Ohl is this Wednesday June 7th at 1030am PT. Learn how to cruise quicker and securely with Generative AI! Check out the Hackathon events page.",
@@ -208,6 +234,16 @@
208
  "themeSimilarity": 1.0
209
  },
210
  {
 
 
 
 
 
 
 
 
 
 
211
  "theme": "Karaoke Night",
212
  "modifier": 5.0,
213
  "message": "Also happening tomorrow~ Wednesday June 7th at 5pm sharp is BUILD KARAOKE NIGHT!!!! celebratemicdrop-boomdancefloor @here",
@@ -216,6 +252,7 @@
216
  "themeSimilarity": 1.0
217
  },
218
  {
 
219
  "theme": "Art Project",
220
  "modifier": 3.0,
221
  "message": "Hey @channel oddly specific request If you\u2019re an artistic human who plays Pok\u00e9mon Go please come find me when you have a little spare time. I\u2019ve got a fun project for you.",
@@ -224,6 +261,7 @@
224
  "themeSimilarity": 1.0
225
  },
226
  {
 
227
  "theme": "Shoes",
228
  "modifier": 0.0,
229
  "message": "All thats left is shoes!!",
@@ -232,6 +270,7 @@
232
  "themeSimilarity": 1.0
233
  },
234
  {
 
235
  "theme": "Arcade Machine",
236
  "modifier": 0.0,
237
  "message": "Just FYI our arcade machine (JOHN) is open for business! Let me know if you have any requests concerns or suggestions. For those asking we have a digital marquee coming in the next few weeks and we'll be vinyl wrapping the cabinet closer to August (when our UX designer returns from leave) Have fun!",
@@ -240,6 +279,7 @@
240
  "themeSimilarity": 1.0
241
  },
242
  {
 
243
  "theme": "Lunch Order",
244
  "modifier": 12.0,
245
  "message": "@here Hope everyone had a restful 3-day weekend! Who's going in tomorrow!? We will be having Bowls from Genghis Grill. If want lunch please drop a dumpling by EOD todayalert0. This will help me determine how much to order! Thank you build_heart Menu Tofu 4 U Bowl - Tofu with dragon salt yellow onions broccoli roasted bell peppers roasted sesame garlic sauce and white rice. Topped with toasted sesame seeds and green onions. Teriyaki Chicken - Chicken broccoli green onion and pineapple in a sweet soy-ginger teriyaki sauce served with white rice. Topped with crunchy chow mein. Bangkok Bowl - Chicken crushed red pepper ginger yellow & green onions sugar snap peas red bell peppers carrots and Udon noodles with a savory sauce. Topped with toasted sesame seeds and green onions. Supreme Fried Rice Bowl - Steak chicken and shrimp with fried rice (w/ yellow & green onions red bell peppers carrots & egg).",
@@ -248,6 +288,7 @@
248
  "themeSimilarity": 1.0
249
  },
250
  {
 
251
  "theme": "Food",
252
  "modifier": 0.0,
253
  "message": "I\u2019ll take a Bangkok bowl!",
@@ -256,6 +297,7 @@
256
  "themeSimilarity": 1.0
257
  },
258
  {
 
259
  "theme": "Anniversary",
260
  "modifier": 0.0,
261
  "message": "Happy 6 year anniversary to the formation of Houston _b QE celebrate-all @Logan Le @Blake Bryce @King Khan",
@@ -264,6 +306,7 @@
264
  "themeSimilarity": 1.0
265
  },
266
  {
 
267
  "theme": "Volunteer Opportunity",
268
  "modifier": 2.0,
269
  "message": "Hey hey hey Houston! Hope you all had a relaxing and enjoyable 3-day weekend. Partners 4 Good will be building Worthy Bags Friday June 2 from 12-1pm 1230-130pm. If you are interested in helping reply here and I\u2019ll forward you the invite. Also feel free to just stop by and help out. Hope to see you Friday! (edited)",
@@ -272,6 +315,7 @@
272
  "themeSimilarity": 1.0
273
  },
274
  {
 
275
  "theme": "Hackathon",
276
  "modifier": 0.0,
277
  "message": "@here a quick note the first session of the Hackathon Subject Matter Expert Series with Bethany Mudd and Chris Samuels is tomorrow May 31st at 1030am PT. Learn how to reimagine the art of the possible with Generative AIai. You can join by using the add to calendar function from the Hackathon events page.",
@@ -280,6 +324,7 @@
280
  "themeSimilarity": 1.0
281
  },
282
  {
 
283
  "theme": "Parking Issue",
284
  "modifier": 0.0,
285
  "message": "@here Hey everyone! If you are currently at the Slalom office and drive a white Mercedes SUV (license plate OKPAKO) please move it immediately as it is parked in a reserved spot on Level 3 and will be towed if not moved by 1pm. giphy (4).gif",
@@ -288,6 +333,7 @@
288
  "themeSimilarity": 1.0
289
  },
290
  {
 
291
  "theme": "Maintenance",
292
  "modifier": 1.0,
293
  "message": "Hello fellow builders brad-badge BRAD brad-badge will be down for the rest of the month as he undergoes an external rework and final physical build. Please ask the Ops team to validate your ticket in the mean time. Thanks everyone!",
@@ -296,7 +342,8 @@
296
  "themeSimilarity": 1.0
297
  },
298
  {
299
- "theme": "Happy Hour",
 
300
  "modifier": 9.0,
301
  "message": "Hi there - a few of us are meeting at RA Sushi for an impromptu happy hour! cheerskawaii-sushi Join us - it's BYOD (Buy Your Own Drink)! blob-wink",
302
  "person": "Linh Ta",
@@ -304,6 +351,7 @@
304
  "themeSimilarity": 1.0
305
  },
306
  {
 
307
  "theme": "713 Day",
308
  "modifier": 0.0,
309
  "message": "Happy 713 Day! image.png image.png",
@@ -312,6 +360,7 @@
312
  "themeSimilarity": 1.0
313
  },
314
  {
 
315
  "theme": "Birthday",
316
  "modifier": 23.0,
317
  "message": "Happy birthday @Ray Lopez! H-Town and Prime days are Ray\u2019s Day. balloons.jpeg balloons.jpeg",
@@ -320,6 +369,7 @@
320
  "themeSimilarity": 1.0
321
  },
322
  {
 
323
  "theme": "Theatre Southwest'S",
324
  "modifier": 3.0,
325
  "message": "Hey Houston fam!flamingo-dance Love community theater? performing_arts Enjoy supporting local arts? Check out Theatre Southwest's Festival of Originals (FOO)! tada Theatre Southwest is a hidden gem gem just a hop skip and jump from the Build Center. In a single show catch 5 short original works by different playwrights each with a different director and cast. FOO runs weekends from July 28 to August 12 spiral_calendar_pad More info and tickets are available at the TSW website. Don't miss out!",
@@ -328,6 +378,7 @@
328
  "themeSimilarity": 1.0
329
  },
330
  {
 
331
  "theme": "Bring Your",
332
  "modifier": 0.0,
333
  "message": "Next Friday - Bring Your Kids to Work Day Have your kiddos ever wondered what you do all day at work or wanted to see the office? Get ready for a fun time that will surely leave them wide-eyed with wonder and brimming with excitement! It\u2019s time to mark your calendars for our. Kindly fill out the RSVP link here by July 14th. Here are some additional things to know Kid Age Range 6 -16 Parents must be involved during this time frame (this is not a babysitting event) Have some fun!",
@@ -336,6 +387,7 @@
336
  "themeSimilarity": 1.0
337
  },
338
  {
 
339
  "theme": "Subway Order",
340
  "modifier": 0.0,
341
  "message": "I love subway. I'm going to order 10 footlongs for the team. Please drop a subway if you want to join in. I'll be ordering at 1130. Thanks",
 
1
  [
2
  {
3
+ "datetime": "2023-07-11 9:21 AM",
4
  "theme": "D&D Campaign",
5
  "modifier": 0.0,
6
  "message": "IMPORTANT ADDITION You do NOT need ANY experience or knowledge of D&D to join the one-shot campaign. R2 will walk you through everything you need to know. Don't be shy and join us! (edited)",
 
9
  "themeSimilarity": 1.0
10
  },
11
  {
12
+ "datetime": "2023-07-11 9:21 AM",
13
  "theme": "Availability",
14
  "modifier": 1.0,
15
  "message": "After the summer then I will be more available.",
 
18
  "themeSimilarity": 1.0
19
  },
20
  {
21
+ "datetime": "2023-07-11 9:21 AM",
22
  "theme": "Meeting",
23
  "modifier": 0.0,
24
  "message": "@here L&L starting in 5 mins. If you are in the office Feel free to come to RICE. AI Tutoring Paving the Way to Better Tomorrows in Education\nhttps//teams.microsoft.com/l/meetup-join/19%3ameeting_MTg2OWRkYzgtYTdmOS00NTk4LWE4MmQ[\u2026]2c%22Oid%22%3a%22bca811aa-1982-4f3b-b602-bca1a89180dc%22%7d",
 
27
  "themeSimilarity": 1.0
28
  },
29
  {
30
+ "datetime": "2023-07-11 9:21 AM",
31
  "theme": "Celebration",
32
  "modifier": 10.0,
33
  "message": "It's @Sam \u2019s 2 year Slalomversary. Sam it's been a pleasure to be on a team with you and thanks for everything you do at _build especially around the ERGs. Congratulations!",
 
36
  "themeSimilarity": 1.0
37
  },
38
  {
39
+ "datetime": "2023-07-11 9:21 AM",
40
  "theme": "Celebration",
41
  "modifier": 0.0,
42
  "message": "Happy Slalomversary my dear friend! @Sam hugging_face",
 
45
  "themeSimilarity": 1.0
46
  },
47
  {
48
+ "datetime": "2023-07-11 9:21 AM",
49
  "theme": "Maintenance",
50
  "modifier": 0.0,
51
  "message": "FYI at 330 today I'll be taking the Arcade machine down for maintenance. It will actually remain down until next Wednesday morning as I work through some marquee configuration. dealwithit",
 
54
  "themeSimilarity": 1.0
55
  },
56
  {
57
+ "datetime": "2023-07-11 9:21 AM",
58
  "theme": "Appreciation",
59
  "modifier": 0.0,
60
  "message": "Thank you to everyone who came into the office yesterday in support of our Build Center tour for Woodside Energy and AWS. Special thanks to @Christy Nolan and @Danny Weldon for their support presenting \u201chow we work\u201d and \u201cwhat we\u2019re working on\u201d. We\u2019re well positioned to win work with the buyer at Woodside stating \u201cseveral consulting companies have pitched to me but nobody aligns better with my vision than Slalom does\u201d.",
 
63
  "themeSimilarity": 1.0
64
  },
65
  {
66
+ "datetime": "2023-07-11 9:21 AM",
67
  "theme": "Time Sheets",
68
  "modifier": 0.0,
69
  "message": "Reminder Time sheets!",
 
72
  "themeSimilarity": 1.0
73
  },
74
  {
75
+ "datetime": "2023-07-11 9:21 AM",
76
  "theme": "Date Night",
77
  "modifier": 0.0,
78
  "message": "Date night with my wife at the Sugar Land Space Cowboys game.",
 
81
  "themeSimilarity": 1.0
82
  },
83
  {
84
+ "datetime": "2023-07-11 9:21 AM",
85
  "theme": "Father'S Day",
86
  "modifier": 0.0,
87
  "message": "Happy Father's day to all you _Builder Dads out there!",
 
90
  "themeSimilarity": 1.0
91
  },
92
  {
93
+ "datetime": "2023-07-11 9:21 AM",
94
+ "theme": "Father'S Day",
95
+ "modifier": 0.0,
96
+ "message": "Anyone had any cool gifts/activities for Father\u2019s Day?",
97
+ "person": "Michelle Francisco",
98
+ "postId": 17,
99
+ "themeSimilarity": 1.0
100
+ },
101
+ {
102
+ "datetime": "2023-07-11 9:21 AM",
103
  "theme": "Cow Appreciation",
104
  "modifier": 7.0,
105
  "message": "National Cow Appreciation Day - @julie.lowe how are the cows? slightly_smiling_face cow",
 
108
  "themeSimilarity": 1.0
109
  },
110
  {
111
+ "datetime": "2023-07-11 9:21 AM",
112
  "theme": "Sunburn",
113
  "modifier": 0.0,
114
  "message": "I applied sunscreen poorly and have stripes of sunburn....",
 
117
  "themeSimilarity": 1.0
118
  },
119
  {
120
+ "datetime": "2023-07-11 9:21 AM",
121
  "theme": "Gift",
122
  "modifier": 0.0,
123
  "message": "My 3 year old daughter went to GAP and selected a flower print shirt for my husband - Nishank (I have never seen him wear flower print till yesterday). She also bought candy 'to share'.",
 
126
  "themeSimilarity": 1.0
127
  },
128
  {
129
+ "datetime": "2023-07-11 9:21 AM",
130
  "theme": "Lunch Order",
131
  "modifier": 0.0,
132
  "message": "@channel Who's going in on Wednesday!? For lunch We will be having lunch from Bellagreen. If want lunch please drop a lunch-bag by EOD today. This will help me determine how much to order! Thank youbuild_heart Options Below comes with chips and fresh fruit...",
 
135
  "themeSimilarity": 1.0
136
  },
137
  {
138
+ "datetime": "2023-07-11 9:21 AM",
139
  "theme": "Build Center",
140
  "modifier": NaN,
141
  "message": "@channel Also happening on Wednesday is the Woodside Build Center Tour beginning at 9am. I would like to have as many Builders in the office as possible. Please make every effort to be on-site. Thank you.",
 
144
  "themeSimilarity": 1.0
145
  },
146
  {
147
+ "datetime": "2023-07-11 9:21 AM",
148
  "theme": "Etiquette",
149
  "modifier": 0.0,
150
  "message": "how to tell someone sitting behind you chewing ice from a solo cup that it is really on your nerves? - asking for a friend",
 
153
  "themeSimilarity": 1.0
154
  },
155
  {
156
+ "datetime": "2023-07-11 9:21 AM",
157
  "theme": "Meeting",
158
  "modifier": 0.0,
159
  "message": "@here Good morning everyone! We are having our CCC today in the rice room from 900-1000am!",
 
162
  "themeSimilarity": 1.0
163
  },
164
  {
165
+ "datetime": "2023-07-11 9:21 AM",
166
  "theme": "Technical Issue",
167
  "modifier": 0.0,
168
  "message": "Is anyone else getting signed out of their sessions from one day to the next? My Chrome tab that had a sharepoint open logged me out my Salesforce link logged out... Anyone else?",
 
171
  "themeSimilarity": 1.0
172
  },
173
  {
174
+ "datetime": "2023-07-11 9:21 AM",
175
  "theme": "Found",
176
  "modifier": 0.0,
177
  "message": "UPDATE They've been found! Thank you @Alexa De La Garza and @Josh Mascorro meow_heart If anyone sees/saw the wine bottles I won from the auction for Target Hunger can you please put them by Melanie\u2019s desk melting_face I think I left them by Rice where we were having karaoke or maybe even by the elevators.",
 
180
  "themeSimilarity": 1.0
181
  },
182
  {
183
+ "datetime": "2023-07-11 9:21 AM",
184
  "theme": "Bake Off",
185
  "modifier": 0.0,
186
  "message": "@here alert-bluecalling all bakers!! Want to show off your skills & take on a challenge to be titled the best baker in the Houston Build Center?? Then enter The Great Build Bake Off!! chefkissblob-birthdaycakefirst_place_medalblobwhee We are doing Cakes this roundblob-birthdaycake! Sign up HERE & bring your best slices on Wednesday June 14th. More deets below point_down Please be sure to pre-cut the cake into bite-size before the judging There will be a People\u2019s Choice and Judges\u2019 Choice as winners You do not need to be present during the judging time to enter. Bakeoff (2).png",
 
189
  "themeSimilarity": 1.0
190
  },
191
  {
192
+ "datetime": "2023-07-11 9:21 AM",
193
  "theme": "Parking Validation",
194
  "modifier": 0.0,
195
  "message": "@here Hello folks! B.R.A.D is working again if anyone in the office needs parking validation brad-badgeblue_car",
 
198
  "themeSimilarity": 1.0
199
  },
200
  {
201
+ "datetime": "2023-07-11 9:21 AM",
202
  "theme": "Severe Storms",
203
  "modifier": 1.0,
204
  "message": "Severe T storms just hit Northside. High winds torrential downpour and the traditional ceremonial power outage.",
 
207
  "themeSimilarity": 1.0
208
  },
209
  {
210
+ "datetime": "2023-07-11 9:21 AM",
211
  "theme": "Safety",
212
  "modifier": 0.0,
213
  "message": "Be safe!",
 
216
  "themeSimilarity": 1.0
217
  },
218
  {
219
+ "datetime": "2023-07-11 9:21 AM",
 
 
 
 
 
 
 
220
  "theme": "Lunch Order",
221
  "modifier": 6.0,
222
  "message": "@here Who's going in on Wednesday!? We will be having Tacos from Velvet Taco. If want lunch please drop a taco by EOD todayalert0. This will help me determine how much to order! Thank you build_heart Buffalo Chicken - crisp tenders house buffalo sauce danish bleu cheese ranch crema carrots micro celery flour tortilla Picnic chicken - rotisserie chicken avocado crema warm honey-dijon potato salad crispy chicken skin cilantro flour tortilla Mediterranean mushroom - grilled portobello mushrooms french fries cucumber grilled heirloom tomatoes dill flour tortilla - Vegan Grilled salmon - napa slaw citrus lime crema pickled fresnos roasted corn pico avocado crema micro cilantro corn tortilla Side Elote & chips- queso listo Valentina citrus lime crema queso fresco lime (edited)",
 
225
  "themeSimilarity": 1.0
226
  },
227
  {
228
+ "datetime": "2023-07-11 9:21 AM",
229
  "theme": "Hackathon",
230
  "modifier": 0.0,
231
  "message": "@here aiHey HOU Build the second Hackathon Subject Matter Expert Series hosted by Carrick Carpenter Miles Erickson and Etienne Ohl is this Wednesday June 7th at 1030am PT. Learn how to cruise quicker and securely with Generative AI! Check out the Hackathon events page.",
 
234
  "themeSimilarity": 1.0
235
  },
236
  {
237
+ "datetime": "2023-07-11 9:21 AM",
238
+ "theme": "Cancelled",
239
+ "modifier": 2.0,
240
+ "message": "My notebook indicates there was a lunch-and-learn on robert's rules of order today but I don't see it on the calendar. Was it cancelled/rescheduled? I don't even see the invite in my email. (edited)",
241
+ "person": "Robert Hailey",
242
+ "postId": 40,
243
+ "themeSimilarity": 1.0
244
+ },
245
+ {
246
+ "datetime": "2023-07-11 9:21 AM",
247
  "theme": "Karaoke Night",
248
  "modifier": 5.0,
249
  "message": "Also happening tomorrow~ Wednesday June 7th at 5pm sharp is BUILD KARAOKE NIGHT!!!! celebratemicdrop-boomdancefloor @here",
 
252
  "themeSimilarity": 1.0
253
  },
254
  {
255
+ "datetime": "2023-07-11 9:21 AM",
256
  "theme": "Art Project",
257
  "modifier": 3.0,
258
  "message": "Hey @channel oddly specific request If you\u2019re an artistic human who plays Pok\u00e9mon Go please come find me when you have a little spare time. I\u2019ve got a fun project for you.",
 
261
  "themeSimilarity": 1.0
262
  },
263
  {
264
+ "datetime": "2023-07-11 9:21 AM",
265
  "theme": "Shoes",
266
  "modifier": 0.0,
267
  "message": "All thats left is shoes!!",
 
270
  "themeSimilarity": 1.0
271
  },
272
  {
273
+ "datetime": "2023-07-11 9:21 AM",
274
  "theme": "Arcade Machine",
275
  "modifier": 0.0,
276
  "message": "Just FYI our arcade machine (JOHN) is open for business! Let me know if you have any requests concerns or suggestions. For those asking we have a digital marquee coming in the next few weeks and we'll be vinyl wrapping the cabinet closer to August (when our UX designer returns from leave) Have fun!",
 
279
  "themeSimilarity": 1.0
280
  },
281
  {
282
+ "datetime": "2023-07-11 9:21 AM",
283
  "theme": "Lunch Order",
284
  "modifier": 12.0,
285
  "message": "@here Hope everyone had a restful 3-day weekend! Who's going in tomorrow!? We will be having Bowls from Genghis Grill. If want lunch please drop a dumpling by EOD todayalert0. This will help me determine how much to order! Thank you build_heart Menu Tofu 4 U Bowl - Tofu with dragon salt yellow onions broccoli roasted bell peppers roasted sesame garlic sauce and white rice. Topped with toasted sesame seeds and green onions. Teriyaki Chicken - Chicken broccoli green onion and pineapple in a sweet soy-ginger teriyaki sauce served with white rice. Topped with crunchy chow mein. Bangkok Bowl - Chicken crushed red pepper ginger yellow & green onions sugar snap peas red bell peppers carrots and Udon noodles with a savory sauce. Topped with toasted sesame seeds and green onions. Supreme Fried Rice Bowl - Steak chicken and shrimp with fried rice (w/ yellow & green onions red bell peppers carrots & egg).",
 
288
  "themeSimilarity": 1.0
289
  },
290
  {
291
+ "datetime": "2023-07-11 9:21 AM",
292
  "theme": "Food",
293
  "modifier": 0.0,
294
  "message": "I\u2019ll take a Bangkok bowl!",
 
297
  "themeSimilarity": 1.0
298
  },
299
  {
300
+ "datetime": "2023-07-11 9:21 AM",
301
  "theme": "Anniversary",
302
  "modifier": 0.0,
303
  "message": "Happy 6 year anniversary to the formation of Houston _b QE celebrate-all @Logan Le @Blake Bryce @King Khan",
 
306
  "themeSimilarity": 1.0
307
  },
308
  {
309
+ "datetime": "2023-07-11 9:21 AM",
310
  "theme": "Volunteer Opportunity",
311
  "modifier": 2.0,
312
  "message": "Hey hey hey Houston! Hope you all had a relaxing and enjoyable 3-day weekend. Partners 4 Good will be building Worthy Bags Friday June 2 from 12-1pm 1230-130pm. If you are interested in helping reply here and I\u2019ll forward you the invite. Also feel free to just stop by and help out. Hope to see you Friday! (edited)",
 
315
  "themeSimilarity": 1.0
316
  },
317
  {
318
+ "datetime": "2023-07-11 9:21 AM",
319
  "theme": "Hackathon",
320
  "modifier": 0.0,
321
  "message": "@here a quick note the first session of the Hackathon Subject Matter Expert Series with Bethany Mudd and Chris Samuels is tomorrow May 31st at 1030am PT. Learn how to reimagine the art of the possible with Generative AIai. You can join by using the add to calendar function from the Hackathon events page.",
 
324
  "themeSimilarity": 1.0
325
  },
326
  {
327
+ "datetime": "2023-07-11 9:21 AM",
328
  "theme": "Parking Issue",
329
  "modifier": 0.0,
330
  "message": "@here Hey everyone! If you are currently at the Slalom office and drive a white Mercedes SUV (license plate OKPAKO) please move it immediately as it is parked in a reserved spot on Level 3 and will be towed if not moved by 1pm. giphy (4).gif",
 
333
  "themeSimilarity": 1.0
334
  },
335
  {
336
+ "datetime": "2023-07-11 9:21 AM",
337
  "theme": "Maintenance",
338
  "modifier": 1.0,
339
  "message": "Hello fellow builders brad-badge BRAD brad-badge will be down for the rest of the month as he undergoes an external rework and final physical build. Please ask the Ops team to validate your ticket in the mean time. Thanks everyone!",
 
342
  "themeSimilarity": 1.0
343
  },
344
  {
345
+ "datetime": "2023-07-11 9:21 AM",
346
+ "theme": "Impromptu Happy",
347
  "modifier": 9.0,
348
  "message": "Hi there - a few of us are meeting at RA Sushi for an impromptu happy hour! cheerskawaii-sushi Join us - it's BYOD (Buy Your Own Drink)! blob-wink",
349
  "person": "Linh Ta",
 
351
  "themeSimilarity": 1.0
352
  },
353
  {
354
+ "datetime": "2023-07-11 9:21 AM",
355
  "theme": "713 Day",
356
  "modifier": 0.0,
357
  "message": "Happy 713 Day! image.png image.png",
 
360
  "themeSimilarity": 1.0
361
  },
362
  {
363
+ "datetime": "2023-07-11 9:21 AM",
364
  "theme": "Birthday",
365
  "modifier": 23.0,
366
  "message": "Happy birthday @Ray Lopez! H-Town and Prime days are Ray\u2019s Day. balloons.jpeg balloons.jpeg",
 
369
  "themeSimilarity": 1.0
370
  },
371
  {
372
+ "datetime": "2023-07-11 9:21 AM",
373
  "theme": "Theatre Southwest'S",
374
  "modifier": 3.0,
375
  "message": "Hey Houston fam!flamingo-dance Love community theater? performing_arts Enjoy supporting local arts? Check out Theatre Southwest's Festival of Originals (FOO)! tada Theatre Southwest is a hidden gem gem just a hop skip and jump from the Build Center. In a single show catch 5 short original works by different playwrights each with a different director and cast. FOO runs weekends from July 28 to August 12 spiral_calendar_pad More info and tickets are available at the TSW website. Don't miss out!",
 
378
  "themeSimilarity": 1.0
379
  },
380
  {
381
+ "datetime": "2023-07-11 9:21 AM",
382
  "theme": "Bring Your",
383
  "modifier": 0.0,
384
  "message": "Next Friday - Bring Your Kids to Work Day Have your kiddos ever wondered what you do all day at work or wanted to see the office? Get ready for a fun time that will surely leave them wide-eyed with wonder and brimming with excitement! It\u2019s time to mark your calendars for our. Kindly fill out the RSVP link here by July 14th. Here are some additional things to know Kid Age Range 6 -16 Parents must be involved during this time frame (this is not a babysitting event) Have some fun!",
 
387
  "themeSimilarity": 1.0
388
  },
389
  {
390
+ "datetime": "2023-07-11 9:21 AM",
391
  "theme": "Subway Order",
392
  "modifier": 0.0,
393
  "message": "I love subway. I'm going to order 10 footlongs for the team. Please drop a subway if you want to join in. I'll be ordering at 1130. Thanks",
slack_processing/slack_data_prep.py CHANGED
@@ -1,6 +1,7 @@
1
  import pandas as pd
2
  import numpy as np
3
  import openai, os, tiktoken, json
 
4
  import importlib.util
5
  from openai.embeddings_utils import cosine_similarity, get_embedding
6
  from sklearn.metrics import classification_report, PrecisionRecallDisplay
@@ -9,10 +10,6 @@ from nltk.corpus import wordnet
9
  from nltk.tokenize import word_tokenize
10
  from utilities import api_keys
11
 
12
- #import pkg_resources
13
- #dotenv_version = pkg_resources.get_distribution("nltk").version
14
- #print(f"wordnet version: {dotenv_version}")
15
-
16
  openai.api_key = api_keys.APIKeys().get_key('OPENAI_API_KEY')
17
 
18
  # Set embedding model parameters
@@ -42,7 +39,8 @@ reference_topics = set([
42
  ])
43
 
44
  class Theme:
45
- def __init__(self, theme, modifier, person, postId, similarity, message):
 
46
  self.theme = theme
47
  self.modifier = modifier
48
  self.message=message
@@ -53,6 +51,7 @@ class Theme:
53
 
54
  def to_dict(self):
55
  return {
 
56
  'theme': self.theme,
57
  'modifier': self.modifier,
58
  'message': self.message,
@@ -92,8 +91,14 @@ def WriteThemes(themes):
92
  json.dump(themes_dict, json_file, indent=4)
93
  print(f"Themes saved to {OUTPUT_THEME_PATH}")
94
 
 
 
 
 
 
 
95
  # Update the process_message function
96
- def ProcessMessage(message, replies, person, id):
97
  message = CleanMessage(message)
98
  completion = openai.ChatCompletion.create(
99
  model="gpt-3.5-turbo",
@@ -159,7 +164,7 @@ def ProcessMessage(message, replies, person, id):
159
  most_similar_score=1.0
160
 
161
  #print(f"{id} From message:'{message}' to theme: {most_similar_topic}")
162
- theme_obj = Theme(theme=most_similar_topic, modifier=replies, person=person, postId=id, message=message, similarity=most_similar_score)
163
  themes.append(theme_obj.to_dict())
164
  #print(f"ThemeObj - id: {id}, theme:{theme_obj.theme}, modifier:{theme_obj.modifier}, person:{theme_obj.person}, topReaction:{theme_obj.topReaction}, message:{theme_obj.message}, similarity:{theme_obj.themeSimilarity}")
165
  return themes
@@ -198,36 +203,50 @@ def FetchSlack():
198
 
199
  def ProcessSlack():
200
  global df, reference_topics
201
- #print("output path:" +OUTPUT_THEME_PATH)
202
  if not os.path.exists(OUTPUT_THEME_PATH):
 
203
  # Read JSON data into DataFrame
204
  df = pd.read_json(INPUT_DATAPATH)
205
  # Keep selected columns and drop rows with missing values
206
  df = df[["person", "datetime", "message","replies", "id"]]
207
  # Filter down to top reaction, then create theme.
208
  #df["reaction"] = df.apply(lambda row: ProcessReactions(row["reactions"],row["id"]), axis=1)
209
- df["theme"] = df.apply(lambda row: ProcessMessage(row["message"], row["replies"], row["person"], row["id"]), axis=1)
 
210
  WriteThemes(themes)
211
  print("Reference topic list:")
212
  for reference_topic in reference_topics:
213
  print(reference_topic)
 
 
 
214
  else:
 
215
  df = pd.read_json(OUTPUT_THEME_PATH)
216
  return df[["person", "theme", "message"]]
217
 
218
  def CreateEmbeddings():
219
  global df
220
- #restrict sample to 500 most recent posts and remove samples that are too long
221
- top_n = SAMPLE_SIZE
222
- df = df.sort_values("datetime").tail(top_n * 2)
223
- df.drop("datetime", axis=1, inplace=True)
224
-
225
- encoding = tiktoken.get_encoding(EMBEDDING_ENCODING)
226
- # omit posts that are too long to embed
227
- df["n_tokens"] = df.theme.apply(lambda x: len(encoding.encode(str(x))))
228
- df = df[df.n_tokens <= MAX_TOKENS].tail(top_n)
229
-
230
- df["embedding"] = df.theme.apply(lambda x: [str(val) for val in get_embedding(str(x), engine=EMBEDDING_MODEL)])
231
-
232
- df.to_json(OUTPUT_THEME_PATH, orient="records", lines=False)
233
- return df
 
 
 
 
 
 
 
 
 
1
  import pandas as pd
2
  import numpy as np
3
  import openai, os, tiktoken, json
4
+ from datetime import datetime as dt
5
  import importlib.util
6
  from openai.embeddings_utils import cosine_similarity, get_embedding
7
  from sklearn.metrics import classification_report, PrecisionRecallDisplay
 
10
  from nltk.tokenize import word_tokenize
11
  from utilities import api_keys
12
 
 
 
 
 
13
  openai.api_key = api_keys.APIKeys().get_key('OPENAI_API_KEY')
14
 
15
  # Set embedding model parameters
 
39
  ])
40
 
41
  class Theme:
42
+ def __init__(self, datetime, theme, modifier, person, postId, similarity, message):
43
+ self.datetime = datetime
44
  self.theme = theme
45
  self.modifier = modifier
46
  self.message=message
 
51
 
52
  def to_dict(self):
53
  return {
54
+ 'datetime':self.datetime,
55
  'theme': self.theme,
56
  'modifier': self.modifier,
57
  'message': self.message,
 
91
  json.dump(themes_dict, json_file, indent=4)
92
  print(f"Themes saved to {OUTPUT_THEME_PATH}")
93
 
94
+ def ProcessDateTime(date_time):
95
+ date_time = dt(2023, 7, 11, 9, 21)
96
+ formatted_time = date_time.strftime("%Y-%m-%d %-I:%M %p")
97
+ json_data = f'{formatted_time}'
98
+ return json_data
99
+
100
  # Update the process_message function
101
+ def ProcessMessage(datetime, message, replies, person, id):
102
  message = CleanMessage(message)
103
  completion = openai.ChatCompletion.create(
104
  model="gpt-3.5-turbo",
 
164
  most_similar_score=1.0
165
 
166
  #print(f"{id} From message:'{message}' to theme: {most_similar_topic}")
167
+ theme_obj = Theme(datetime=datetime, theme=most_similar_topic, modifier=replies, person=person, postId=id, message=message, similarity=most_similar_score)
168
  themes.append(theme_obj.to_dict())
169
  #print(f"ThemeObj - id: {id}, theme:{theme_obj.theme}, modifier:{theme_obj.modifier}, person:{theme_obj.person}, topReaction:{theme_obj.topReaction}, message:{theme_obj.message}, similarity:{theme_obj.themeSimilarity}")
170
  return themes
 
203
 
204
  def ProcessSlack():
205
  global df, reference_topics
206
+ print("output path:" +OUTPUT_THEME_PATH)
207
  if not os.path.exists(OUTPUT_THEME_PATH):
208
+ print("ProcessSlack - path not exist in process slack")
209
  # Read JSON data into DataFrame
210
  df = pd.read_json(INPUT_DATAPATH)
211
  # Keep selected columns and drop rows with missing values
212
  df = df[["person", "datetime", "message","replies", "id"]]
213
  # Filter down to top reaction, then create theme.
214
  #df["reaction"] = df.apply(lambda row: ProcessReactions(row["reactions"],row["id"]), axis=1)
215
+ df["datetime"] = df.apply(lambda row: ProcessDateTime(row["datetime"]), axis=1)
216
+ df["theme"] = df.apply(lambda row: ProcessMessage(row["datetime"], row["message"], row["replies"], row["person"], row["id"]), axis=1)
217
  WriteThemes(themes)
218
  print("Reference topic list:")
219
  for reference_topic in reference_topics:
220
  print(reference_topic)
221
+ print("df at end of process slack")
222
+ print(df)
223
+ print("----------")
224
  else:
225
+ print("ProcessSlack - path exists in process slack")
226
  df = pd.read_json(OUTPUT_THEME_PATH)
227
  return df[["person", "theme", "message"]]
228
 
229
  def CreateEmbeddings():
230
  global df
231
+ print("df: OUTPUT_THEME_EMBEDDINGS_PATH -"+OUTPUT_THEME_EMBEDDINGS_PATH)
232
+ print(df)
233
+ if not os.path.exists(OUTPUT_THEME_EMBEDDINGS_PATH):
234
+ print("CreateEmbeddings path does NOT exist")
235
+ ProcessSlack()
236
+ #restrict sample to 500 most recent posts and remove samples that are too long
237
+ top_n = SAMPLE_SIZE
238
+ df = df.sort_values("datetime").tail(top_n * 2)
239
+ df.drop("datetime", axis=1, inplace=True)
240
+
241
+ encoding = tiktoken.get_encoding(EMBEDDING_ENCODING)
242
+ # omit posts that are too long to embed
243
+ df["n_tokens"] = df.theme.apply(lambda x: len(encoding.encode(str(x))))
244
+ df = df[df.n_tokens <= MAX_TOKENS].tail(top_n)
245
+
246
+ df["embedding"] = df.theme.apply(lambda x: [str(val) for val in get_embedding(str(x), engine=EMBEDDING_MODEL)])
247
+
248
+ df.to_json(OUTPUT_THEME_EMBEDDINGS_PATH, orient="records", lines=False)
249
+ else:
250
+ print("CreateEmbeddings path does exist")
251
+ df = pd.read_json(OUTPUT_THEME_EMBEDDINGS_PATH)
252
+ return df[["person", "theme", "message", "embedding"]]