modify run_app_en_zh (#221)
Browse files- run_app_en.py +5 -5
- run_app.py → run_app_zh.py +0 -0
run_app_en.py
CHANGED
@@ -25,21 +25,21 @@ from pathlib import Path
|
|
25 |
|
26 |
def main():
|
27 |
"""Main function to launch the OWL Intelligent Assistant Platform"""
|
28 |
-
#
|
29 |
project_root = Path(__file__).resolve().parent
|
30 |
os.chdir(project_root)
|
31 |
|
32 |
-
#
|
33 |
log_dir = project_root / "logs"
|
34 |
log_dir.mkdir(exist_ok=True)
|
35 |
|
36 |
-
#
|
37 |
sys.path.insert(0, str(project_root))
|
38 |
|
39 |
try:
|
40 |
from owl.app_en import create_ui
|
41 |
|
42 |
-
#
|
43 |
app = create_ui()
|
44 |
app.queue().launch(share=False)
|
45 |
|
@@ -58,4 +58,4 @@ def main():
|
|
58 |
|
59 |
|
60 |
if __name__ == "__main__":
|
61 |
-
main()
|
|
|
25 |
|
26 |
def main():
|
27 |
"""Main function to launch the OWL Intelligent Assistant Platform"""
|
28 |
+
# Ensure the current directory is the project root
|
29 |
project_root = Path(__file__).resolve().parent
|
30 |
os.chdir(project_root)
|
31 |
|
32 |
+
# Create log directory
|
33 |
log_dir = project_root / "logs"
|
34 |
log_dir.mkdir(exist_ok=True)
|
35 |
|
36 |
+
# Add project root to Python path
|
37 |
sys.path.insert(0, str(project_root))
|
38 |
|
39 |
try:
|
40 |
from owl.app_en import create_ui
|
41 |
|
42 |
+
# Create and launch the application
|
43 |
app = create_ui()
|
44 |
app.queue().launch(share=False)
|
45 |
|
|
|
58 |
|
59 |
|
60 |
if __name__ == "__main__":
|
61 |
+
main()
|
run_app.py → run_app_zh.py
RENAMED
File without changes
|