add data prototype for testing; start.sh for launching things
This commit is contained in:
parent
9ff0eac50e
commit
d51bb4a562
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
venv
|
venv
|
||||||
|
api_key
|
||||||
|
20
data.py
Executable file
20
data.py
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
from PIL import Image
|
||||||
|
from openai import OpenAI
|
||||||
|
import pytesseract as OCR
|
||||||
|
import os
|
||||||
|
|
||||||
|
OCR.pytesseract.tesseract_cmd = r"/usr/local/bin/tesseract"
|
||||||
|
|
||||||
|
client = OpenAI(
|
||||||
|
api_key = os.environ.get("OPENAI_API_KEY"),
|
||||||
|
)
|
||||||
|
|
||||||
|
def app():
|
||||||
|
# data shit --> where does it come from???
|
||||||
|
data = OCR.image_to_string("input.png")
|
||||||
|
|
||||||
|
print(data)
|
||||||
|
|
||||||
|
"""
|
||||||
|
UNFINISHED
|
||||||
|
"""
|
2
main.py
2
main.py
@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import sqlite3
|
import sqlite3
|
||||||
from flask import Flask, request, jsonify
|
from flask import Flask, request, jsonify
|
||||||
|
from flask import render_template
|
||||||
|
import data
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user