Update helper.py
Browse files
helper.py
CHANGED
@@ -8,6 +8,7 @@ import matplotlib.pyplot as plt
|
|
8 |
import requests
|
9 |
import asyncprawcore
|
10 |
import shutil
|
|
|
11 |
|
12 |
from pathlib import Path
|
13 |
from typing import List, Dict, Any
|
@@ -18,8 +19,8 @@ from huggingface_hub import InferenceClient, notebook_login
|
|
18 |
|
19 |
def get_access_to_reddit(user_agent="financial sentiment analysis project (research phase) (by u/ditalinianalysis)"):
|
20 |
reddit = asyncpraw.Reddit(
|
21 |
-
client_id="
|
22 |
-
client_secret=
|
23 |
user_agent=user_agent
|
24 |
)
|
25 |
return reddit
|
|
|
8 |
import requests
|
9 |
import asyncprawcore
|
10 |
import shutil
|
11 |
+
import os
|
12 |
|
13 |
from pathlib import Path
|
14 |
from typing import List, Dict, Any
|
|
|
19 |
|
20 |
def get_access_to_reddit(user_agent="financial sentiment analysis project (research phase) (by u/ditalinianalysis)"):
|
21 |
reddit = asyncpraw.Reddit(
|
22 |
+
client_id=os.getenv("REDDIT_CLIENT_ID"),
|
23 |
+
client_secret=os.getenv("REDDIT_SECRET"),
|
24 |
user_agent=user_agent
|
25 |
)
|
26 |
return reddit
|