Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def retrieve_thoughts(query, n, db):
|
|
57 |
tier_1_adjusted = tier_1.groupby(['_id']).first().reset_index()[['_id', 'title', 'author','url', 'score']]
|
58 |
tier_1_adjusted['ref'] = range(1, len(tier_1_adjusted) + 1 )
|
59 |
tier_1_adjusted['chunks'] = list(chunks_1)
|
60 |
-
score = tier_1.groupby(['_id' ]).apply(lambda x: x['score'].
|
61 |
tier_1_adjusted['score'] = score
|
62 |
tier_1_adjusted.sort_values("score", inplace = True)
|
63 |
|
|
|
57 |
tier_1_adjusted = tier_1.groupby(['_id']).first().reset_index()[['_id', 'title', 'author','url', 'score']]
|
58 |
tier_1_adjusted['ref'] = range(1, len(tier_1_adjusted) + 1 )
|
59 |
tier_1_adjusted['chunks'] = list(chunks_1)
|
60 |
+
score = tier_1.groupby(['_id' ]).apply(lambda x: x['score'].median()).values
|
61 |
tier_1_adjusted['score'] = score
|
62 |
tier_1_adjusted.sort_values("score", inplace = True)
|
63 |
|