yoheinakajima / instagraph

Converts text input or URL into knowledge graph and displays
MIT License
3.47k stars 293 forks source link

View OpenAITokens and Remove 1 eventlistener to Submit to avoid double API calls #31

Closed mesax1 closed 1 year ago

mesax1 commented 1 year ago

Summary by CodeRabbit

Release Notes for Pull Request:

coderabbitai[bot] commented 1 year ago

Walkthrough

This update introduces enhancements to both the backend and frontend of the application. The backend now calculates and displays token usage, while the frontend has been improved with a loading animation, better color contrast for text, and more efficient handling of POST requests and graph rendering.

Changes

File Summary
main.py Added functionality to calculate and display total tokens used.
templates/index.html Enhanced form submission handling, added loading animation, improved text color contrast, optimized POST request handling, and refined graph rendering.

🐇 "In the land of code, where logic is king,

Changes are made, improvements they bring.

Tokens counted, animations spin,

With each pull request, we all win! 🎉"


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - Mention `@coderabbitai` in any *review comment* for bot assistance. - Note: Review comments are made on code diffs or files, not on the PR overview. ### Pause Incremental Reviews - Insert `@coderabbitai: ignore` in the PR description to halt the bot's ongoing reviews. Remove the line to resume.