Skip to content

:shipit: let ai guess what your favourite subreddit is all about!

Notifications You must be signed in to change notification settings

jaruserickson/whaddit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

whaddit


Let AI guess what your favourite subreddit is all about!

Usage

To use whaddit, you'll need a few python libraries first (and an API key!)

pip3 install clarifai
pip3 install beautifulsoup4
pip3 install requests

After installing the 3 libraries above, you'll need an api key for clarifai since i can't afford to host on my own!

https://www.clarifai.com/

Then simply input your favourite subreddit and clarifai will guess what the subreddit is about, and try to predict its /r/ url!

Here's a common output! 😃

python3 whaddit.py
Please input a subreddit: dogs
Validating subreddit...
Scraping subreddit...
Getting data from clarifai... (this may take a minute)
Getting most common trends...
I think your subreddit is about dog (97.755847%) or maybe mammal (95.322234%) or portrait (93.955130%).
Complete.

Logic

whaddit is a combination of multiple python libraries and some basic data analysis.

whaddit works as follows:

  1. Verify the subreddit a user inputs is valid with Requests and JSON
  2. Using BeautifulSoup4, whaddit scrapes the imgur/r/sub the user specifies and gets urls to the 50 hottest photos from the subreddit
  3. Clarifai will then analyze all the photos and predict what is in each photo, feeding results into a large dictionary
  4. whaddit orders the predictions based on percentage and occurrence

That's all there is to it!

created with 💜 on a thursday in January

About

:shipit: let ai guess what your favourite subreddit is all about!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages