Spaces:
Running
Running
Update posts_categorization.py
Browse files- posts_categorization.py +1 -1
posts_categorization.py
CHANGED
@@ -21,7 +21,7 @@ def summarize_post(text):
|
|
21 |
if pd.isna(text) or text is None:
|
22 |
return None
|
23 |
|
24 |
-
text = str(text)[:
|
25 |
|
26 |
prompt = f"""
|
27 |
Summarize the following LinkedIn post in 5 to 10 words.
|
|
|
21 |
if pd.isna(text) or text is None:
|
22 |
return None
|
23 |
|
24 |
+
text = str(text)[:500] # truncate to avoid token overflow
|
25 |
|
26 |
prompt = f"""
|
27 |
Summarize the following LinkedIn post in 5 to 10 words.
|