This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Head from 'next/head' | |
| import Image from 'next/image' | |
| import { Inter } from '@next/font/google' | |
| import styles from '../styles/Home.module.css' | |
| import Link from 'next/link'; | |
| import React from 'react'; | |
| import VideoBackground from './VideoBackground'; | |
| const inter = Inter({ subsets: ['latin'] }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| flask | |
| Pillow==9.2.0 | |
| pytesseract |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: gunicorn entrypoint:app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import Flask and any other necessary modules at the top of the file | |
| from flask import Flask, request, jsonify | |
| import ocr | |
| from PIL import Image | |
| app = Flask(__name__) | |
| @app.route('/process_image', methods=['POST']) | |
| def process_image(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| import pytesseract | |
| import sys | |
| def process(image_file): | |
| # If you don't have tesseract executable in your PATH, include the following: | |
| # pytesseract.pytesseract.tesseract_cmd = r'/opt/homebrew/bin/tesseract' | |
| pytesseract.pytesseract.tesseract_cmd = 'tesseract' | |
| # Example tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| import pytesseract | |
| import sys | |
| def process(image_file): | |
| # If you don't have tesseract executable in your PATH, include the following: | |
| # pytesseract.pytesseract.tesseract_cmd = r'/opt/homebrew/bin/tesseract' | |
| pytesseract.pytesseract.tesseract_cmd = 'tesseract' | |
| # Example tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| import pytesseract | |
| import sys | |
| def process(image_file): | |
| # If you don't have tesseract executable in your PATH, include the following: | |
| # pytesseract.pytesseract.tesseract_cmd = r'/opt/homebrew/bin/tesseract' | |
| pytesseract.pytesseract.tesseract_cmd | |
| # Example tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % curl -X POST -H "Content-Type: multipart/form-data" -F "image=@/Users/reallymemorable/git/myapp/receipt1.jpg" https://myapp.herokuapp.com/process_image | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta charset="utf-8"> | |
| <title>Application Error</title> | |
| <style media="screen"> | |
| html,body,iframe { | |
| margin: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| import pytesseract | |
| import sys | |
| def process(image_file): | |
| # If you don't have tesseract executable in your PATH, include the following: | |
| pytesseract.pytesseract.tesseract_cmd = r'/opt/homebrew/bin/tesseract' | |
| # Example tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function startAndHide() { | |
| // update(); | |
| Tone.Transport.start(); | |
| document.getElementById('start').style.display = 'none'; | |
| } | |
| The HTML: |
NewerOlder