hamza2923 commited on
Commit
d0bef6c
·
verified ·
1 Parent(s): 90636ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -150,10 +150,19 @@ async def get_transcript(request: VideoRequest):
150
  if driver:
151
  driver.quit()
152
 
153
- @app.get("/")
154
  async def health_check():
155
- return {"status": "OK", "message": "YouTube Transcript API is running"}
156
-
 
 
 
 
 
 
 
 
 
157
  if __name__ == "__main__":
158
  import uvicorn
159
  uvicorn.run(app, host="0.0.0.0", port=int(os.getenv("PORT", 7860)))
 
150
  if driver:
151
  driver.quit()
152
 
153
+ @app.get("/health")
154
  async def health_check():
155
+ paths = {
156
+ "chrome": "/usr/bin/google-chrome-stable",
157
+ "chromedriver": "/usr/bin/chromedriver"
158
+ }
159
+ exists = {name: os.path.exists(path) for name, path in paths.items()}
160
+ return {
161
+ "status": "OK",
162
+ "paths": exists,
163
+ "chrome_version": os.popen("/usr/bin/google-chrome-stable --version").read().strip() if exists["chrome"] else "Not found",
164
+ "chromedriver_version": os.popen("/usr/bin/chromedriver --version").read().strip() if exists["chromedriver"] else "Not found"
165
+ }
166
  if __name__ == "__main__":
167
  import uvicorn
168
  uvicorn.run(app, host="0.0.0.0", port=int(os.getenv("PORT", 7860)))