Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,11 @@ from sentence_transformers import SentenceTransformer, util
|
|
| 8 |
df = pd.read_csv("top_100_influencers_combined.csv")
|
| 9 |
df.fillna("", inplace=True)
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
df["profile_text"] = df[profile_fields].agg(" - ".join, axis=1)
|
| 14 |
|
| 15 |
# Load embedding model
|
|
|
|
| 8 |
df = pd.read_csv("top_100_influencers_combined.csv")
|
| 9 |
df.fillna("", inplace=True)
|
| 10 |
|
| 11 |
+
# Extract platform name from Source File (e.g., 'youtube_data_greece.csv' -> 'Youtube')
|
| 12 |
+
df['Platform'] = df['Source File'].str.split('_').str[0].str.capitalize()
|
| 13 |
+
|
| 14 |
+
# Prepare text for embedding (include platform)
|
| 15 |
+
profile_fields = ["Name", "Platform", "Niche", "Country"]
|
| 16 |
df["profile_text"] = df[profile_fields].agg(" - ".join, axis=1)
|
| 17 |
|
| 18 |
# Load embedding model
|