Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from helpers import (
|
|
13 |
)
|
14 |
|
15 |
from file_loader import get_vectorstore
|
16 |
-
import asyncio
|
17 |
|
18 |
if "GOOGLE_API_KEY" not in os.environ:
|
19 |
os.environ["GOOGLE_API_KEY"] = "AIzaSyDJ4vIKuIBIPNHATLxnoHlagXWbsAz-vRs"
|
@@ -24,7 +24,7 @@ key = "AIzaSyDJ4vIKuIBIPNHATLxnoHlagXWbsAz-vRs"
|
|
24 |
# Cấu hình API key cho Google GenAI
|
25 |
genai.configure(api_key=key)
|
26 |
|
27 |
-
vectorstore =
|
28 |
# Define the augment_prompt function
|
29 |
def augment_prompt(query: str, k: int = 10):
|
30 |
queries = []
|
@@ -107,11 +107,5 @@ with gr.Blocks() as demo:
|
|
107 |
# playwright_path = get_driver_dir()
|
108 |
|
109 |
if __name__ == "__main__":
|
110 |
-
|
111 |
-
|
112 |
-
# if not hasattr(demo, "stop_event") or demo.stop_event is None:
|
113 |
-
# demo.stop_event = asyncio.Event()
|
114 |
-
demo.launch()
|
115 |
-
|
116 |
-
|
117 |
# demo.launch()
|
|
|
13 |
)
|
14 |
|
15 |
from file_loader import get_vectorstore
|
16 |
+
# import asyncio
|
17 |
|
18 |
if "GOOGLE_API_KEY" not in os.environ:
|
19 |
os.environ["GOOGLE_API_KEY"] = "AIzaSyDJ4vIKuIBIPNHATLxnoHlagXWbsAz-vRs"
|
|
|
24 |
# Cấu hình API key cho Google GenAI
|
25 |
genai.configure(api_key=key)
|
26 |
|
27 |
+
vectorstore = get_vectorstore()
|
28 |
# Define the augment_prompt function
|
29 |
def augment_prompt(query: str, k: int = 10):
|
30 |
queries = []
|
|
|
107 |
# playwright_path = get_driver_dir()
|
108 |
|
109 |
if __name__ == "__main__":
|
110 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
# demo.launch()
|