Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
import os
|
2 |
-
os.environ["OPENCV_VIDEOIO_PRIORITY_GSTREAMER"] = "0" # Disable GStreamer
|
3 |
import fitz # PyMuPDF for PDF handling
|
4 |
import easyocr # OCR for text extraction
|
5 |
import tempfile
|
6 |
import streamlit as st
|
7 |
|
|
|
|
|
8 |
|
9 |
def extract_text_with_ocr(pdf_path):
|
10 |
"""
|
|
|
1 |
import os
|
|
|
2 |
import fitz # PyMuPDF for PDF handling
|
3 |
import easyocr # OCR for text extraction
|
4 |
import tempfile
|
5 |
import streamlit as st
|
6 |
|
7 |
+
# Disable GStreamer to prevent OpenCV-related errors
|
8 |
+
os.environ["OPENCV_VIDEOIO_PRIORITY_GSTREAMER"] = "0"
|
9 |
|
10 |
def extract_text_with_ocr(pdf_path):
|
11 |
"""
|