Essa20001 commited on
Commit
f8fc900
·
verified ·
1 Parent(s): 2342b17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -6,7 +6,19 @@ import io
6
 
7
 
8
  def main():
9
-
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  st.title("CV to JSON Converter")
12
 
 
6
 
7
 
8
  def main():
9
+
10
+ try:
11
+ if sys.platform.startswith('linux'):
12
+ # Install Poppler on Linux
13
+ subprocess.run(['sudo', 'apt-get', 'update'], check=True)
14
+ subprocess.run(['sudo', 'apt-get', 'install', '-y', 'poppler-utils'], check=True)
15
+ elif sys.platform == 'darwin':
16
+ # Install Poppler on macOS
17
+ subprocess.run(['brew', 'install', 'poppler'], check=True)
18
+ else:
19
+ print("Unsupported OS. Please install Poppler manually.")
20
+ except subprocess.CalledProcessError as e:
21
+ print(f"Error occurred during installation: {e}")
22
 
23
  st.title("CV to JSON Converter")
24