Spaces:
Sleeping
Sleeping
Commit
·
a2baa53
1
Parent(s):
fbe92ad
made some changes made pdf working
Browse files- .gitignore +2 -1
- Ubuntu-Regular.ttf +2 -2
- app.py +2 -1
.gitignore
CHANGED
@@ -6,4 +6,5 @@ __pycache__/
|
|
6 |
*.pyw
|
7 |
*.pyz
|
8 |
*.pywz
|
9 |
-
venv/
|
|
|
|
6 |
*.pyw
|
7 |
*.pyz
|
8 |
*.pywz
|
9 |
+
venv/
|
10 |
+
env/
|
Ubuntu-Regular.ttf
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4d647420bc8c9d42901303aed4a7b915ddaee0f67f74b0021d2d45d8f1a7bd1b
|
3 |
+
size 80932
|
app.py
CHANGED
@@ -48,7 +48,8 @@ def main():
|
|
48 |
cols[1].subheader("Мәтіннің біріктірілген нұсқасы")
|
49 |
|
50 |
if uploaded_file is not None:
|
51 |
-
|
|
|
52 |
doc = DocumentFile.from_pdf(uploaded_file.read())
|
53 |
else:
|
54 |
doc = DocumentFile.from_images(uploaded_file.read())
|
|
|
48 |
cols[1].subheader("Мәтіннің біріктірілген нұсқасы")
|
49 |
|
50 |
if uploaded_file is not None:
|
51 |
+
print(uploaded_file.name)
|
52 |
+
if uploaded_file.name.lower().endswith(".pdf"):
|
53 |
doc = DocumentFile.from_pdf(uploaded_file.read())
|
54 |
else:
|
55 |
doc = DocumentFile.from_images(uploaded_file.read())
|