crowles commited on
Commit
41ac0fe
·
verified ·
1 Parent(s): bc04243

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -3,8 +3,14 @@ import gradio as gr
3
  import subprocess
4
 
5
  try:
6
- # Run the apt-get install command
7
- subprocess.run(['apt-get', 'install', '-y', 'poppler-utils', 'tesseract-ocr', 'tesseract-ocr-eng'], check=True)
 
 
 
 
 
 
8
  print("Packages installed successfully!")
9
  except subprocess.CalledProcessError as e:
10
  print(f"An error occurred: {e}")
 
3
  import subprocess
4
 
5
  try:
6
+ # Update the package lists
7
+ subprocess.run(['sudo', 'apt-get', 'update'], check=True)
8
+
9
+ # Install the required packages
10
+ subprocess.run(['sudo', 'apt-get', 'install', '-y', 'poppler-utils'], check=True)
11
+ subprocess.run(['sudo', 'apt-get', 'install', '-y', 'tesseract-ocr'], check=True)
12
+ subprocess.run(['sudo', 'apt-get', 'install', '-y', 'tesseract-ocr-eng'], check=True)
13
+
14
  print("Packages installed successfully!")
15
  except subprocess.CalledProcessError as e:
16
  print(f"An error occurred: {e}")