Skip to content

Commit 2641c42

Browse files
committed
Removed completed TODOs
1 parent c4b3004 commit 2641c42

File tree

6 files changed

+1
-19
lines changed

6 files changed

+1
-19
lines changed
-275 Bytes
Binary file not shown.

App/templates/predictions.html

Lines changed: 0 additions & 7 deletions
This file was deleted.

App/views.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class SelectPredFileView(TemplateView):
4848
"""
4949

5050
template_name = "select_file_predictions.html"
51-
success_url = '/predict_success/'
5251
parser_classes = FormParser
5352
queryset = FileModel.objects.all()
5453

@@ -63,14 +62,6 @@ def get_context_data(self, **kwargs):
6362
return context
6463

6564

66-
class PredictionsSuccessView(TemplateView):
67-
"""
68-
This is the success view of the UploadView class.
69-
"""
70-
# TODO: this view should be opened from SelectPredFileView.send-filename
71-
template_name = 'predictions.html'
72-
73-
7465
class FileView(views.APIView):
7566
"""
7667
This class contains the method to upload and delete a file interacting directly with the API.
@@ -119,7 +110,6 @@ def post(self, request):
119110
This method is used to making predictions on audio files previously loaded with FileView.post
120111
"""
121112
with graph.as_default():
122-
# TODO: Fix the logic as filename is always catching the default value. With correct default it works.
123113
filename = request.POST.getlist('file_name').pop()
124114
filepath = str(os.path.join(settings.MEDIA_ROOT, filename))
125115
data, sampling_rate = librosa.load(filepath)
-83 Bytes
Binary file not shown.

DjangoRestDeepLearning/urls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from django.conf.urls import url, include
2121
from django.conf.urls.static import static
2222

23-
from App.views import UploadView, UploadSuccessView, IndexView, SelectPredFileView, PredictionsSuccessView
23+
from App.views import UploadView, UploadSuccessView, IndexView, SelectPredFileView
2424

2525
urlpatterns = [
2626
url(r'^admin/', admin.site.urls),
@@ -33,7 +33,6 @@
3333

3434
# Urls to select a file for the predictions
3535
url('fileselect/', SelectPredFileView.as_view(), name='file_select'),
36-
url('predict_success/', PredictionsSuccessView.as_view(), name='pred_success'),
3736
]
3837

3938
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

logfile

Whitespace-only changes.

0 commit comments

Comments
 (0)