jhj0517 commited on
Commit
abfa7a9
1 Parent(s): 4c75ce6

add shell scripts

Browse files
Files changed (2) hide show
  1. Install.sh +17 -0
  2. start-webui.sh +11 -0
Install.sh ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ if [ ! -d "venv" ]; then
4
+ echo "Creating virtual environment..."
5
+ python -m venv venv
6
+ fi
7
+
8
+ source venv/bin/activate
9
+
10
+ pip install -r requirements.txt && echo "Requirements installed successfully." || {
11
+ echo ""
12
+ echo "Requirements installation failed. Please remove the venv folder and run the script again."
13
+ deactivate
14
+ exit 1
15
+ }
16
+
17
+ deactivate
start-webui.sh ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ source venv/bin/activate
4
+
5
+ PYTHON="venv/bin/python"
6
+ echo "venv ${PYTHON}"
7
+ echo ""
8
+
9
+ $PYTHON app.py $*
10
+
11
+ deactivate