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

Any link inputted gets summarized. #2

Open
Aadityaa2606 opened this issue Jan 27, 2024 · 2 comments
Open

Any link inputted gets summarized. #2

Aadityaa2606 opened this issue Jan 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Aadityaa2606
Copy link
Member

bug Description
The issue is if we input any link (eg. www.google.com) the summariser thinks it's an article link and summarises it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://aisummariser.oxlac.com/ or clone and run the local dev environment.
  2. copy and paste a nonrelevant link.
  3. click on go.
  4. see the non-relevant summary.

Expected behavior
Prevent accepting irrelevant links, if the user tries to submit an irrelevant link then show them an error similar to this

image

Bug Screenshots
bug

Possible approaches

@Aadityaa2606 Aadityaa2606 added the bug Something isn't working label Jan 27, 2024
@rnavaneeth992
Copy link
Contributor

claim

@Aadityaa2606
Copy link
Member Author

The fix proposed by @rnavaneeth992 is a really good approach but not quite feasible for every irrelevant link, so I am reopening the issue back for other contributors to make additional improvements to the detection system on top of the existing approach!

Explanation of the Fix:

  • The previous fix added a try-catch block after querying the URL, the try-catch block Raises an HTTP error if the HTTP request returned an unsuccessful status code. which means if the link didn't give any HTTP error it doesn't detect the link is irrelevant

  • There was also a second check placed that if the summary content is 0, it predicts the URL as invalid.

Additional improvements that can be made:

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