| from django.urls import path | |
| from .views import PredictView, PredictionResultView | |
| from django.conf import settings | |
| from django.conf.urls.static import static | |
| urlpatterns = [ | |
| path('predict/', PredictView.as_view(), name='predict'), | |
| path('result/', PredictionResultView.as_view(), name='prediction_result'), # Remove the <int:predicted_label> | |
| ] | |
| if settings.DEBUG: | |
| urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) | |