Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bert 문장 유사도 모듈의 return 값에 json 으로 변환 불가능한 형식 제거 #5

Open
KYUUUW opened this issue Aug 3, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@KYUUUW
Copy link
Contributor

KYUUUW commented Aug 3, 2021

[{'name': 'Light Blue Dolce&Gabbana for women', 'similarity': array([[0.5619153]], dtype=float32), 'review': 'Everyday love', 'accords': "['citrus', 'woody', 'fresh', 'fruity', 'aromatic', 'musky', 'powdery', 'green']"}, {'name': 'Mon Guerlain Guerlain for women', 'similarity': array([[0.556712]], dtype=float32), 'review': 'A good everyday scent.', 'accords': "['vanilla', 'woody', 'lavender', 'aromatic', 'powdery', 'balsamic', 'sweet', 'warm spicy', 'fresh spicy', 'iris']"}, {'name': 'Allure Homme Sport Eau Extreme Chanel for men', 'similarity': array([[0.5487282]], dtype=float32), 'review': 'Good', 'accords': "['aromatic', 'vanilla', 'woody', 'fresh spicy', 'green', 'citrus', 'sweet', 'amber', 'musky', 'warm spicy']"}]

보기 힘들겠지만 array([[0.5619153]], dtype=float32) 저 부분때문에 json.dumps() 에서 오류 발생함.

우선 뒤에 [0][0]을 붙여서 해결해보겠음

@KYUUUW KYUUUW added the bug Something isn't working label Aug 3, 2021
@KYUUUW
Copy link
Contributor Author

KYUUUW commented Aug 3, 2021

해당 오류는 해결되었는데 float32 를 json.dumps() 가 지원하지 않는다는 오류가 발생합니다...ㅠㅠ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants