Rams901 commited on
Commit
f244e49
1 Parent(s): 6da8cb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,8 +58,8 @@ def retrieve_thoughts(query, n):
58
  # tier_2 = df[(df['score'] < 0.95) * (df["score"] > 0.7)]
59
 
60
 
61
- chunks_1 = tier_1.groupby(['title', 'url', '_id']).apply(lambda x: "\n...\n".join(x.sort_values('id')['page_content'].values)).values
62
- tier_1_adjusted = tier_1.groupby(['title', 'url', '_id']).first().reset_index()[['_id', 'title', 'url', 'score']]
63
  tier_1_adjusted['ref'] = range(1, len(tier_1_adjusted) + 1 )
64
  tier_1_adjusted['content'] = chunks_1
65
 
 
58
  # tier_2 = df[(df['score'] < 0.95) * (df["score"] > 0.7)]
59
 
60
 
61
+ chunks_1 = tier_1.groupby(['title', 'url']).apply(lambda x: "\n...\n".join(x.sort_values('id')['page_content'].values)).values
62
+ tier_1_adjusted = tier_1.groupby(['title', 'url').first().reset_index()[['title', 'url', 'score']]
63
  tier_1_adjusted['ref'] = range(1, len(tier_1_adjusted) + 1 )
64
  tier_1_adjusted['content'] = chunks_1
65