File size: 454 Bytes
8a6b560
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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)