Update app.py
Browse files
app.py
CHANGED
@@ -15,12 +15,8 @@ from pyspark.sql.functions import col, udf, monotonically_increasing_id, collect
|
|
15 |
from pyspark.sql.types import StringType
|
16 |
from huggingface_hub import HfApi
|
17 |
|
18 |
-
# Load token from Hugging Face Secrets
|
19 |
-
HF_TOKEN = os.environ.get("RedditSemanticSearch"
|
20 |
-
|
21 |
-
# Authenticate
|
22 |
-
api = HfApi()
|
23 |
-
api.set_access_token(HF_TOKEN)
|
24 |
|
25 |
# Define target subreddits
|
26 |
target_subreddits = ["askscience", "gaming", "technology", "todayilearned", "programming"]
|
|
|
15 |
from pyspark.sql.types import StringType
|
16 |
from huggingface_hub import HfApi
|
17 |
|
18 |
+
# Load token from Hugging Face Secrets
|
19 |
+
HF_TOKEN = os.environ.get("RedditSemanticSearch"
|
|
|
|
|
|
|
|
|
20 |
|
21 |
# Define target subreddits
|
22 |
target_subreddits = ["askscience", "gaming", "technology", "todayilearned", "programming"]
|