Spaces:
Running
on
Zero
Running
on
Zero
VictorSanh
commited on
Commit
•
c497b41
1
Parent(s):
726bfbb
hack
Browse files
app.py
CHANGED
@@ -16,6 +16,18 @@ IMAGE_GALLERY_PATHS = [
|
|
16 |
for ex_image in os.listdir(f"example_images")
|
17 |
]
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
def add_file_gallery(selected_state: gr.SelectData, gallery_list: List[str]):
|
20 |
# return (
|
21 |
# f"example_images/{gallery_list.root[selected_state.index].image.orig_name}",
|
|
|
16 |
for ex_image in os.listdir(f"example_images")
|
17 |
]
|
18 |
|
19 |
+
import subprocess
|
20 |
+
|
21 |
+
def install_playwright():
|
22 |
+
try:
|
23 |
+
subprocess.run(["playwright", "install"], check=True)
|
24 |
+
print("Playwright installation successful.")
|
25 |
+
except subprocess.CalledProcessError as e:
|
26 |
+
print(f"Error during Playwright installation: {e}")
|
27 |
+
|
28 |
+
# Call the function to install Playwright
|
29 |
+
install_playwright()
|
30 |
+
|
31 |
def add_file_gallery(selected_state: gr.SelectData, gallery_list: List[str]):
|
32 |
# return (
|
33 |
# f"example_images/{gallery_list.root[selected_state.index].image.orig_name}",
|