Skip to content

Commit

Permalink
Merge pull request #50 from barun-saha/visual
Browse files Browse the repository at this point in the history
Add icons
  • Loading branch information
barun-saha authored Oct 6, 2024
2 parents aeb4c8f + 759ba4b commit 6269917
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 7 deletions.
4 changes: 2 additions & 2 deletions file_embeddings/embeddings.npy
Git LFS file not shown
4 changes: 2 additions & 2 deletions file_embeddings/icons.npy
Git LFS file not shown
2 changes: 1 addition & 1 deletion global_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GlobalConfig:

LLM_PROGRESS_MAX = 90
ICONS_DIR = 'icons/png128/'
TINY_BERT_MODEL = 'gaunernst/bert-tiny-uncased'
TINY_BERT_MODEL = 'gaunernst/bert-mini-uncased'
EMBEDDINGS_FILE_NAME = 'file_embeddings/embeddings.npy'
ICONS_FILE_NAME = 'file_embeddings/icons.npy'

Expand Down
46 changes: 44 additions & 2 deletions helpers/icons_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,51 @@ def main():
# Run this again if icons are to be added/removed
save_icons_embeddings()

keywords = ['deep learning', 'library', 'universe', 'brain', 'cybersecurity', 'gaming', '']
keywords = [
'deep learning',
'',
'recycling',
'handshake',
'Ferry',
'rain drop',
'speech bubble',
'mental resilience',
'turmeric',
'Art',
'price tag',
'Oxygen',
'oxygen',
'Social Connection',
'Accomplishment',
'Python',
'XML',
'Handshake',
]
icon_files = find_icons(keywords)
print(f'The relevant icon files are: {icon_files}')
print(
f'The relevant icon files are:\n'
f'{list(zip(keywords, icon_files))}'
)

# BERT tiny:
# [('deep learning', 'deep-learning'), ('', '123'), ('recycling', 'refinery'),
# ('handshake', 'dash-circle'), ('Ferry', 'cart'), ('rain drop', 'bucket'),
# ('speech bubble', 'globe'), ('mental resilience', 'exclamation-triangle'),
# ('turmeric', 'kebab'), ('Art', 'display'), ('price tag', 'bug-fill'),
# ('Oxygen', 'radioactive')]

# BERT mini
# [('deep learning', 'deep-learning'), ('', 'compass'), ('recycling', 'tools'),
# ('handshake', 'bandaid'), ('Ferry', 'cart'), ('rain drop', 'trash'),
# ('speech bubble', 'image'), ('mental resilience', 'recycle'), ('turmeric', 'linkedin'),
# ('Art', 'book'), ('price tag', 'card-image'), ('Oxygen', 'radioactive')]

# BERT small
# [('deep learning', 'deep-learning'), ('', 'gem'), ('recycling', 'tools'),
# ('handshake', 'handbag'), ('Ferry', 'truck'), ('rain drop', 'bucket'),
# ('speech bubble', 'strategy'), ('mental resilience', 'deep-learning'),
# ('turmeric', 'flower'),
# ('Art', 'book'), ('price tag', 'hotdog'), ('Oxygen', 'radioactive')]


if __name__ == '__main__':
Expand Down
Binary file added icons/png128/csv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png128/handshake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png128/html.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png128/lock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png128/python.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png128/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png128/txt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png128/xml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png128/yml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions icons/svg_repo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Icons collections used (and their licenses) from SVG Repo:
- Objects Infographic Icons (CC0 License): https://www.svgrepo.com/collection/objects-infographic-icons/
- Scientifics Study Collection (CC0 License): https://www.svgrepo.com/collection/scientifics-study/
- Thanksgiving 4 Collection (CC0 License): https://www.svgrepo.com/collection/thanksgiving-4/
- Using Hands Collection (CC0 License): https://www.svgrepo.com/collection/using-hands/
- Vaadin Flat Vectors Collection (Apache License): https://www.svgrepo.com/collection/vaadin-flat-vectors/

- India ICON SET (SVG) [NO attribution required]: https://icon666.com/collection/india_m7tgpnohh
Expand Down Expand Up @@ -172,3 +173,4 @@ https://www.svgrepo.com/download/423082/fast-food-fried-2.svg
https://www.svgrepo.com/download/209887/tea-coffee-cup.svg
https://www.svgrepo.com/download/209855/restaurant-spoon.svg
https://www.svgrepo.com/download/209875/jelly-jar.svg
https://www.svgrepo.com/download/83723/handshake.svg

0 comments on commit 6269917

Please sign in to comment.