Use dynamic paths
Browse files- src/streamlit_app.py +1 -2
src/streamlit_app.py
CHANGED
|
@@ -8,7 +8,6 @@ from torchvision.transforms import v2
|
|
| 8 |
from torchvision.models import resnet18, ResNet18_Weights
|
| 9 |
|
| 10 |
@st.cache_resource
|
| 11 |
-
n# Chemin absolu du dossier contenant ce script
|
| 12 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 13 |
def load_model():
|
| 14 |
model = resnet18(weights=None)
|
|
@@ -67,4 +66,4 @@ if button1 or button2:
|
|
| 67 |
|
| 68 |
if button3:
|
| 69 |
st.session_state.filename = random.choice(os.listdir(directory))
|
| 70 |
-
st.rerun()
|
|
|
|
| 8 |
from torchvision.models import resnet18, ResNet18_Weights
|
| 9 |
|
| 10 |
@st.cache_resource
|
|
|
|
| 11 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 12 |
def load_model():
|
| 13 |
model = resnet18(weights=None)
|
|
|
|
| 66 |
|
| 67 |
if button3:
|
| 68 |
st.session_state.filename = random.choice(os.listdir(directory))
|
| 69 |
+
st.rerun()
|