mariapar commited on
Commit
5fc617f
·
verified ·
1 Parent(s): eca6614

Update app_core.py

Browse files
Files changed (1) hide show
  1. app_core.py +8 -0
app_core.py CHANGED
@@ -11,6 +11,14 @@ import os, json, subprocess, shutil, textwrap, tempfile
11
  from pathlib import Path
12
  from datetime import datetime
13
 
 
 
 
 
 
 
 
 
14
  # -------- third-party --------
15
  from openai import OpenAI # ≥ 1.33.0
16
  from pydub import AudioSegment
 
11
  from pathlib import Path
12
  from datetime import datetime
13
 
14
+ _pw_flag = pathlib.Path("/tmp/.pw_chromium_installed")
15
+
16
+ if not _pw_flag.exists():
17
+ print("▶ Installing Playwright Chromium … (first-run only)")
18
+ # --with-deps тянет системные libnss, libatk и т. д.
19
+ subprocess.run(["playwright", "install", "--with-deps", "chromium"], check=True)
20
+ _pw_flag.touch()
21
+
22
  # -------- third-party --------
23
  from openai import OpenAI # ≥ 1.33.0
24
  from pydub import AudioSegment