Skip to content

Commit

Permalink
Merge pull request #57 from CheatSOL/fix/lastFix
Browse files Browse the repository at this point in the history
FEAT: .env 추가로 인한 CICD 파이프라인 수정
  • Loading branch information
JaeIn1 authored Jun 27, 2024
2 parents a03ca8e + eb6c54b commit 5097308
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
echo "KIS_APP_KEY=${{ secrets.KIS_APP_KEY}}" >> .env
echo "KIS_SECRECT_KEY=${{ secrets.KIS_SECRECT_KEY }}" >> .env
echo "PORT=${{ secrets.PORT }}" >> .env
echo "INSTA_UID_KEY=${{ secrets.INSTA_UID_KEY }}" >> .env
echo "INSTA_KEY=${{ secrets.INSTA_KEY }}" >> .env
echo "NAVER_ID=${{ secrets.NAVER_ID }}" >> .env
echo "NAVER_SECRET=${{ secrets.NAVER_SECRET }}" >> .env
echo "YOUTUBE_KEY=${{ secrets.YOUTUBE_KEY }}" >> .env
echo "INSTA_IP=${{ secrets.INSTA_IP }}" >> .env
# Build step removed since there is no build script

Expand Down
2 changes: 0 additions & 2 deletions src/routes/instagram-news.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const fetchData = async (url) => {
thumbnail_url: null,
url: `https://www.instagram.com/p/${post.postCode}`,
}));
console.log(formattedData);
return formattedData;
} catch (error) {
console.error(error);
Expand Down Expand Up @@ -49,7 +48,6 @@ router.get("/", async (req, res) => {
cache = await cacheController.getCache(keyword, social, 0);
}
posts = JSON.parse(cache.dataValues.data);
console.log("fff", posts);
res.json(posts);
} catch (err) {
console.error("Error fetching Instagram posts:", err);
Expand Down
8 changes: 7 additions & 1 deletion src/scripts/get_similar_words.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,24 @@
model = Word2Vec.load('src/scripts/word2vec_model.model')

results = []

shinhan = ['신한', '신한투자증권', 'SOL', '신한투자']
for index, row in df.iterrows(): # 각 행에 대해 반복

name = row['name']
code = row['code']

try:
similarity = model.wv.similarity(word, name)
results.append({"name": name, "code": code, "similarity": similarity})
except Exception as e:
results.append({"name": name, "code": code, "similarity": 0})


if word in shinhan:
for result in results:
if result["name"] == "신한지주":
result["similarity"] = 1

results = sorted(results, key=lambda x: x['similarity'], reverse=True)
for result in results:
result['similarity'] = str(result['similarity'])
Expand Down

0 comments on commit 5097308

Please sign in to comment.