Skip to content

Add URL Input Support for Fact-Checking#105

Merged
Deepika14145 merged 1 commit into
Deepika14145:mainfrom
Akash6299625764:feature-check-url
Oct 14, 2025
Merged

Add URL Input Support for Fact-Checking#105
Deepika14145 merged 1 commit into
Deepika14145:mainfrom
Akash6299625764:feature-check-url

Conversation

@Akash6299625764
Copy link
Copy Markdown
Contributor

This PR adds the ability for the FactChecker API to accept a URL in addition to plain text.

Changes included:

Added utils/fetch_url.py to fetch and extract text content from web pages.

Updated /predict and /predict_all endpoints to handle an optional "url" key.

If a URL is provided, the text is fetched and passed to the fact-checker; otherwise, text input is used.

Preserves existing prediction logic and backward compatibility.

How to test:

Run the Flask app locally:

python app.py

Send a POST request with JSON body:

Text input: {"text": "Some news text"}

URL input: {"url": "https://example.com/article"}

Verify JSON response contains prediction, confidence, message, and analysis.

Benefit:

Allows users to quickly check the authenticity of online articles via URL.

Enhances usability and lays the groundwork for future front-end improvements.

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 11, 2025

@Akash6299625764 is attempting to deploy a commit to the deepika's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Deepika14145 Deepika14145 merged commit 53b897f into Deepika14145:main Oct 14, 2025
1 check failed
@Deepika14145
Copy link
Copy Markdown
Owner

What is your issue id??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants