Zienab Makhloof
commited on
Commit
•
e0b63b3
1
Parent(s):
791944e
ocr-first
Browse files- app.py +6 -0
- app/__init__.py +15 -0
- render.yaml +13 -0
app.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from app import create_app
|
2 |
+
|
3 |
+
app = create_app()
|
4 |
+
|
5 |
+
if __name__ == '__main__':
|
6 |
+
app.run()
|
app/__init__.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from flask import Flask
|
2 |
+
from app.config import Config
|
3 |
+
import os
|
4 |
+
|
5 |
+
def create_app():
|
6 |
+
app = Flask(__name__)
|
7 |
+
app.config.from_object(Config)
|
8 |
+
|
9 |
+
# إنشاء مجلد للملفات المرفوعة
|
10 |
+
os.makedirs(os.path.join(app.instance_path, 'uploads'), exist_ok=True)
|
11 |
+
|
12 |
+
from app.routes import main
|
13 |
+
app.register_blueprint(main)
|
14 |
+
|
15 |
+
return app
|
render.yaml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
services:
|
2 |
+
- type: web
|
3 |
+
name: my-app
|
4 |
+
env: python
|
5 |
+
repo: https://github.com/ZienabMakhloof/ocr.git
|
6 |
+
branch: main
|
7 |
+
buildCommand: "pip install -r requirements.txt"
|
8 |
+
startCommand: "python app.py"
|
9 |
+
envVars:
|
10 |
+
- key: PYTHON_VERSION
|
11 |
+
value: 3.10.11
|
12 |
+
region: oregon
|
13 |
+
plan: standard
|