AhsanRazi commited on
Commit
d961e29
·
verified ·
1 Parent(s): a9a1ce7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -1,12 +1,21 @@
1
  # === Home.py (Main file) ===
2
 
 
3
  import subprocess
4
 
5
- # Install Playwright browsers if not already installed
6
- subprocess.run(["playwright", "install", "chromium"], check=True)
 
 
 
 
 
 
 
 
7
 
8
- import streamlit as st
9
 
 
10
  st.set_page_config(
11
  page_title="Home",
12
  page_icon="🏠"
 
1
  # === Home.py (Main file) ===
2
 
3
+ import streamlit as st
4
  import subprocess
5
 
6
+ # Install all Playwright browsers with system dependencies
7
+ try:
8
+ subprocess.run(
9
+ ["playwright", "install", "--with-deps", "chromium", "firefox", "webkit"],
10
+ check=True
11
+ )
12
+ print("Successfully installed all browsers for Crawl4AI.")
13
+ except subprocess.CalledProcessError as e:
14
+ print(f"Browser installation failed: {e}")
15
+
16
 
 
17
 
18
+ # APP code
19
  st.set_page_config(
20
  page_title="Home",
21
  page_icon="🏠"