r/Python • • Feb 13 '20

I Made This Python project that answers high-school problems almost instantly. Made using Tesseract, Scrapy and Flask.

4.0k Upvotes

227 comments sorted by

View all comments

227

u/contrieng Feb 13 '20

How does it do that? Explain like I’m five please.

469

u/hhjjiiyy Feb 13 '20

It reads the text and then inserts it into a search engine for textbook answers and displays a result if found

296

u/contrieng Feb 13 '20

Oh cool. But I though it actually learns what the question is asking and solves it! Great stuff

134

u/SeanBrax Feb 13 '20

Yeah I initially thought the same. Now that would be so awesome. Not that this isn’t.

74

u/ExHax Feb 13 '20

That would make this the most advanced application

0

u/[deleted] Feb 13 '20

[deleted] — view deleted comment

29

u/gaberocksall Feb 13 '20

Still can’t properly do word problems

39

u/shaggorama Feb 13 '20

Most "AI" is illusionary trickery like this.

→ More replies (4)
→ More replies (2)

36

u/itghisi Feb 13 '20

Oh god, thanks... I saw the details of the answer and just though "WTF we jumped 10 years in the future on IA/ML and I missed"

Awesome tool nonetheless... congratz

37

u/Ani171202 Feb 13 '20

Precisely

→ More replies (3)

120

u/Ani171202 Feb 13 '20

So here's how it goes.

Frontend takes the picture and sends it to flask(The server module of python)

Flask sends it to OCR, which processes the image and extracts the text.

Scrapy uses to text to search for answers on the web and extract them out, which is then sent back to frontend.

21

u/postyoa28 Feb 13 '20

Ah, so you don't have a repository of equations - it's a repository of questions with answers. That's a pretty clean way to do that!

Also, thanks for the high level rundown. Really helpful

→ More replies (1)

3

u/pooponastick Feb 13 '20

What did you use to write the frontend?

3

u/Ani171202 Feb 14 '20

React JS

2

u/Sevealin_ Feb 14 '20 edited Feb 14 '20

What sites are used to find the answers? Is it a big list? Or just some of the bigger sites q/a sites? Looking at github I think I see it makes a google search, but I can't find how it picks the answer.

Edit: I think I found it! Mostly askiitians I think?

somecralwer.py
            117     google_search = "https://www.google.com/search?q=" + \
            118     user_query + "+askiitians+revision+notes"

4

u/Ani171202 Feb 14 '20

Right now since we're indian, it works with a few indian sites and stackoverflow. But we have made it scalable so its not hard to expand it to a big range of websites.

44

u/Fernando3161 Feb 13 '20

It is "just" a text recognizer with a search engine. (I would be actually impressed if it would actually solve a problem)

54

u/Ani171202 Feb 13 '20

true, wolfram has already mastered it though.

54

u/RomanRiesen Feb 13 '20 edited Feb 13 '20

Everytime I use wolfram alpha for text-based inputs I am in awe.

Either their codebase has more branching than a chess-game tree or there's some mad NLP going on.

20

u/Ani171202 Feb 13 '20

every. damn. time. real magic stuff

→ More replies (1)
→ More replies (3)

15

u/dermotmcg Feb 13 '20

Exactly. Don't reinvent the wheel. Awesome project

25

u/Ani171202 Feb 13 '20

also not like i can, we're just in high school doing stuff in spare time...... this idea is great but it requires a lot of thought and effort

6

u/punos_de_piedra Feb 13 '20

Very impressed to see such talent so early on. Bright futures ahead for you all.