raannakasturi commited on
Commit
5c41f4e
·
verified ·
1 Parent(s): e2e9d43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -1
app.py CHANGED
@@ -102,6 +102,26 @@ app = gr.Interface(
102
  api_name="capture"
103
  )
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  if __name__ == "__main__":
106
- print(subprocess.run(["apt-get update && apt-get install -y chromium-chromedriver"], shell=True))
 
107
  app.launch()
 
102
  api_name="capture"
103
  )
104
 
105
+ def installChrome():
106
+ # Update package list
107
+ subprocess.run(['apt-get', 'update'])
108
+
109
+ # Install wget and unzip
110
+ subprocess.run(['apt-get', 'install', '-y', 'wget', 'unzip'])
111
+
112
+ # Download Google Chrome
113
+ subprocess.run(['wget', 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'])
114
+
115
+ # Install Google Chrome
116
+ subprocess.run(['apt-get', 'install', '-y', './google-chrome-stable_current_amd64.deb'])
117
+
118
+ # Remove the downloaded package
119
+ subprocess.run(['rm', 'google-chrome-stable_current_amd64.deb'])
120
+
121
+ # Clean up
122
+ subprocess.run(['apt-get', 'clean'])
123
+
124
  if __name__ == "__main__":
125
+ installChrome()
126
+ print(subprocess.run("App Starting...")
127
  app.launch()