fffiloni commited on
Commit
539f3c6
·
verified ·
1 Parent(s): e02c605

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+
5
+ # Get the current path of this script
6
+ current_path = os.path.abspath(__file__)
7
+ print('current_path', current_path)
8
+
9
+ # Get the parent directory of the current script
10
+ parent_path = os.path.dirname(current_path)
11
+ print('parent_path', parent_path)
12
+
13
+ # Append the parent directory to the system path
14
+ sys.path.append(parent_path)
15
+ print('sys.path', sys.path)
16
+
17
+ # Form the command with the required arguments
18
+ command = [
19
+ 'python', 'injection_main.py',
20
+ '--mode', 'app'
21
+ ]
22
+
23
+ # Execute the command
24
+ subprocess.run(command)