Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,10 @@ import fitz # PyMuPDF
|
|
5 |
from docx import Document
|
6 |
from rembg import remove
|
7 |
import gradio as gr
|
|
|
8 |
|
|
|
|
|
9 |
def trim_whitespace(image):
|
10 |
gray_image = ImageOps.grayscale(image)
|
11 |
inverted_image = ImageChops.invert(gray_image)
|
|
|
5 |
from docx import Document
|
6 |
from rembg import remove
|
7 |
import gradio as gr
|
8 |
+
import os
|
9 |
|
10 |
+
# ایجاد دایرکتوری static
|
11 |
+
os.makedirs("static", exist_ok=True)
|
12 |
def trim_whitespace(image):
|
13 |
gray_image = ImageOps.grayscale(image)
|
14 |
inverted_image = ImageChops.invert(gray_image)
|