ToolHunt icon indicating copy to clipboard operation
ToolHunt copied to clipboard

Feature/performance and security fixes

Open canonrebel04 opened this issue 1 year ago • 0 comments

This pull request introduces several improvements to the application, including performance enhancements, security fixes, and better code readability.

Performance

  • The semantic search model and FAISS index are now loaded only once at startup, significantly improving search performance.
  • Switched to a smaller sentence-transformer model (all-MiniLM-L6-v2) to reduce memory usage.

Security

  • Patched a Cross-Site Scripting (XSS) vulnerability in the search results by properly escaping HTML content.

Bug Fixes

  • Fixed a KeyError caused by incorrect column names in the CSV file.
  • Fixed several syntax errors.

Dependencies

  • Added pandas to the dependencies.
  • Created a requirements.txt file.
  • Added hf_xet for better performance with Xet Storage.
  • Created a .gitignore file to exclude temporary files.

Documentation

  • Added comments to backend/semantic_search.py to explain the hybrid search logic and the purpose of the SemanticSearch class.
  • Added comments to templates/index.html to the JavaScript code to explain the purpose of each function and the logic of the displayResults function.

canonrebel04 avatar Sep 11 '25 10:09 canonrebel04