Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def retrieve_thoughts(query, ):
|
|
52 |
tier_2 = df[((df['score'] < 1) * (df["score"] > 0.7))]
|
53 |
|
54 |
tier_1
|
55 |
-
chunks_1 = tier_1.groupby(['title', 'url', ]).apply(lambda x: "\n...\n".join(x.sort_values('id')['page_content'].values[:min(
|
56 |
tier_1_adjusted = tier_1.groupby(['title', 'url', ]).first().reset_index()[[ 'title', 'url']]
|
57 |
tier_1_adjusted['ref'] = range(1, len(tier_1_adjusted) + 1 )
|
58 |
tier_1_adjusted['content'] = chunks_1
|
|
|
52 |
tier_2 = df[((df['score'] < 1) * (df["score"] > 0.7))]
|
53 |
|
54 |
tier_1
|
55 |
+
chunks_1 = tier_1.groupby(['title', 'url', ]).apply(lambda x: "\n...\n".join(x.sort_values('id')['page_content'].values[:min(4, len(x.sort_values('id')['page_content'].values))])).values
|
56 |
tier_1_adjusted = tier_1.groupby(['title', 'url', ]).first().reset_index()[[ 'title', 'url']]
|
57 |
tier_1_adjusted['ref'] = range(1, len(tier_1_adjusted) + 1 )
|
58 |
tier_1_adjusted['content'] = chunks_1
|