Spaces:
Running
Running
- app.py +7 -0
- requirements.txt +1 -5
- setup.sh +3 -0
app.py
CHANGED
@@ -9,6 +9,13 @@ from streamlit_js_eval import streamlit_js_eval
|
|
9 |
from streamlit_drawable_canvas import st_canvas
|
10 |
from modules.streamlit_utils import *
|
11 |
from glob import glob
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
from streamlit_image_annotation import detection
|
13 |
from modules.toXML import create_XML
|
14 |
|
|
|
9 |
from streamlit_drawable_canvas import st_canvas
|
10 |
from modules.streamlit_utils import *
|
11 |
from glob import glob
|
12 |
+
import os
|
13 |
+
import subprocess
|
14 |
+
|
15 |
+
# Run the setup script if the package is not installed
|
16 |
+
if not os.path.exists('Streamlit-Image-Annotation'):
|
17 |
+
subprocess.run(['bash', 'setup.sh'], check=True)
|
18 |
+
|
19 |
from streamlit_image_annotation import detection
|
20 |
from modules.toXML import create_XML
|
21 |
|
requirements.txt
CHANGED
@@ -10,8 +10,4 @@ streamlit_image_select
|
|
10 |
opencv-python==4.9.0.80
|
11 |
gdown
|
12 |
streamlit_js_eval
|
13 |
-
psutil
|
14 |
-
# Run the setup script
|
15 |
-
!bash ./setup.sh
|
16 |
-
# Install the package in editable mode
|
17 |
-
-e ./Streamlit-Image-Annotation
|
|
|
10 |
opencv-python==4.9.0.80
|
11 |
gdown
|
12 |
streamlit_js_eval
|
13 |
+
psutil
|
|
|
|
|
|
|
|
setup.sh
CHANGED
@@ -2,3 +2,6 @@
|
|
2 |
|
3 |
# Unzip the package
|
4 |
unzip -o Streamlit-Image-Annotation.zip -d Streamlit-Image-Annotation
|
|
|
|
|
|
|
|
2 |
|
3 |
# Unzip the package
|
4 |
unzip -o Streamlit-Image-Annotation.zip -d Streamlit-Image-Annotation
|
5 |
+
|
6 |
+
# Install the package in editable mode
|
7 |
+
pip install -e ./Streamlit-Image-Annotation
|