Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from tqdm import tqdm
|
|
| 5 |
from langchain_community.vectorstores import FAISS
|
| 6 |
from langchain_google_genai import GoogleGenerativeAIEmbeddings
|
| 7 |
import google.generativeai as genai
|
| 8 |
-
from playwright._impl._driver import get_driver_dir
|
| 9 |
|
| 10 |
from helpers import (
|
| 11 |
list_docx_files, get_splits, get_json_splits_only, prompt_order, log_message
|
|
@@ -103,11 +103,11 @@ with gr.Blocks() as demo:
|
|
| 103 |
# textbox=prompt,
|
| 104 |
# additional_inputs=[category1, category2]
|
| 105 |
)
|
| 106 |
-
playwright_path = get_driver_dir()
|
| 107 |
|
| 108 |
if __name__ == "__main__":
|
| 109 |
os.environ["USER_AGENT"] = "gradio-hf-space"
|
| 110 |
-
if not os.path.exists(
|
| 111 |
print("Installing Playwright...")
|
| 112 |
os.system("playwright install --with-deps")
|
| 113 |
demo.launch()
|
|
|
|
| 5 |
from langchain_community.vectorstores import FAISS
|
| 6 |
from langchain_google_genai import GoogleGenerativeAIEmbeddings
|
| 7 |
import google.generativeai as genai
|
| 8 |
+
# from playwright._impl._driver import get_driver_dir
|
| 9 |
|
| 10 |
from helpers import (
|
| 11 |
list_docx_files, get_splits, get_json_splits_only, prompt_order, log_message
|
|
|
|
| 103 |
# textbox=prompt,
|
| 104 |
# additional_inputs=[category1, category2]
|
| 105 |
)
|
| 106 |
+
# playwright_path = get_driver_dir()
|
| 107 |
|
| 108 |
if __name__ == "__main__":
|
| 109 |
os.environ["USER_AGENT"] = "gradio-hf-space"
|
| 110 |
+
if not os.path.exists('/home/user/.cache/ms-playwright/'):
|
| 111 |
print("Installing Playwright...")
|
| 112 |
os.system("playwright install --with-deps")
|
| 113 |
demo.launch()
|