Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
|
@@ -10,8 +10,8 @@ import os
|
|
| 10 |
app = FastAPI(title="OCR API", description="API d'extraction de texte pour PDF et images")
|
| 11 |
|
| 12 |
# Initialiser PaddleOCR (français et anglais)
|
| 13 |
-
ocr_fr = PaddleOCR(use_angle_cls=True, lang='fr'
|
| 14 |
-
ocr_en = PaddleOCR(use_angle_cls=True, lang='en'
|
| 15 |
|
| 16 |
def extract_text_from_image(image_bytes, lang='fr'):
|
| 17 |
"""Extrait le texte d'une image"""
|
|
|
|
| 10 |
app = FastAPI(title="OCR API", description="API d'extraction de texte pour PDF et images")
|
| 11 |
|
| 12 |
# Initialiser PaddleOCR (français et anglais)
|
| 13 |
+
ocr_fr = PaddleOCR(use_angle_cls=True, lang='fr')
|
| 14 |
+
ocr_en = PaddleOCR(use_angle_cls=True, lang='en')
|
| 15 |
|
| 16 |
def extract_text_from_image(image_bytes, lang='fr'):
|
| 17 |
"""Extrait le texte d'une image"""
|