Spaces:
Runtime error
Runtime error
jackycedar
commited on
Commit
•
efc3db6
1
Parent(s):
ef7e159
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,8 @@
|
|
11 |
# !pip install -q pdf2image
|
12 |
|
13 |
import subprocess
|
|
|
|
|
14 |
|
15 |
# Install the package
|
16 |
# python -m pip install --upgrade pip
|
@@ -19,8 +21,9 @@ subprocess.run(["python", "-m", "pip", "install", "--upgrade", "pip"])
|
|
19 |
subprocess.run(["pip", "install", "llama-index"])
|
20 |
subprocess.run(["pip", "install", "PyPDF2"])
|
21 |
|
22 |
-
subprocess.run(["apt-get", "update", "-y"])
|
23 |
-
subprocess.run(["apt-get", "install", "-y","poppler-utils"])
|
|
|
24 |
# !sudo apt-get install -y poppler-utils
|
25 |
subprocess.run(["apt-get", "install", "-y","tesseract-ocr"])
|
26 |
|
@@ -29,8 +32,7 @@ subprocess.run(["pip", "install", "pdf2image"])
|
|
29 |
# subprocess.run(["pip", "install", "llama-index"])
|
30 |
# subprocess.run(["pip", "install", "llama-index"])
|
31 |
|
32 |
-
|
33 |
-
import os
|
34 |
|
35 |
# folder_path = "/content/doc"
|
36 |
home_path = "/home/user/app/"
|
|
|
11 |
# !pip install -q pdf2image
|
12 |
|
13 |
import subprocess
|
14 |
+
import sys
|
15 |
+
import os
|
16 |
|
17 |
# Install the package
|
18 |
# python -m pip install --upgrade pip
|
|
|
21 |
subprocess.run(["pip", "install", "llama-index"])
|
22 |
subprocess.run(["pip", "install", "PyPDF2"])
|
23 |
|
24 |
+
# subprocess.run(["apt-get", "update", "-y"])
|
25 |
+
# subprocess.run(["apt-get", "install", "-y","poppler-utils"])
|
26 |
+
os.system('apt-get install -y poppler-utils')
|
27 |
# !sudo apt-get install -y poppler-utils
|
28 |
subprocess.run(["apt-get", "install", "-y","tesseract-ocr"])
|
29 |
|
|
|
32 |
# subprocess.run(["pip", "install", "llama-index"])
|
33 |
# subprocess.run(["pip", "install", "llama-index"])
|
34 |
|
35 |
+
|
|
|
36 |
|
37 |
# folder_path = "/content/doc"
|
38 |
home_path = "/home/user/app/"
|