Commit f8449fa0 authored by LiniEisha's avatar LiniEisha Committed by I.K Seneviratne

Models

parent 1ebb516e
......@@ -4,4 +4,6 @@ from django.contrib import admin
from LectureSummarizingApp.models import *
admin.site.register(LectureAudio)
admin.site.register(LectureAudioNoiseRemoved)
admin.site.register(LectureSpeechToText)
admin.site.register(LectureAudioSummary)
......@@ -16,6 +16,29 @@ class LectureAudio (models.Model):
def __str__(self):
return self.lecture_audio_id
class LectureAudioNoiseRemoved (models.Model):
lecture_audio_noise_removed_id = models.CharField(max_length=10)
lecture_audio_id = models.ForeignKey(LectureAudio, on_delete=models.CASCADE)
lecturer_date = models.DateField()
lecture_audio_name = models.CharField(max_length=50)
lecture_audio_length = models.DurationField()
lecturer = models.ForeignKey(Lecturer, on_delete=models.CASCADE, default=0)
subject = models.ForeignKey(Subject, on_delete=models.CASCADE, default=0)
def __str__(self):
return self.lecture_audio_noise_removed_id
class LectureSpeechToText (models.Model):
lecture_speech_to_text_id = models.CharField(max_length=10)
lecture_audio_id = models.ForeignKey(LectureAudio, on_delete=models.CASCADE)
audio_original_text = models.TextField()
def __str__(self):
return self.lecture_speech_to_text_id
class LectureAudioSummary (models.Model):
lecture_audio_summary_id = models.CharField(max_length=10)
lecture_audio_id = models.ForeignKey(LectureAudio, on_delete=models.CASCADE)
......@@ -24,3 +47,4 @@ class LectureAudioSummary (models.Model):
def __str__(self):
return self.lecture_audio_summary_id
......@@ -14,9 +14,25 @@ class LectureAudioSerializer(serializers.ModelSerializer):
fields = '__all__'
class LectureAudioSummarySerializer(serializers.ModelSerializer):
class LectureAudioNoiseRemovedSerializer(serializers.ModelSerializer):
lecture_audio_id = LectureAudioSerializer()
class Meta:
model = LectureAudioNoiseRemoved
fields = '__all__'
class LectureSpeechToTextSerializer(serializers.ModelSerializer):
lecture_speech_to_text_id = LectureAudioNoiseRemovedSerializer()
class Meta:
model = LectureSpeechToText
fields = '__all__'
class LectureAudioSummarySerializer(serializers.ModelSerializer):
lecture_audio_noise_removed_id = LectureSpeechToTextSerializer()
class Meta:
model = LectureAudioSummary
fields = '__all__'
\ No newline at end of file
......@@ -5,6 +5,63 @@
<title>Summarization</title>
</head>
<body>
<p>This is summarization</p>
<!-- Page Wrapper -->
{% block javascript %}
{% load static %}
<!-- Bootstrap core JavaScript-->
<script src="{% static 'FirstApp/vendor/jquery/jquery.min.js' %}"></script>
<script src="{% static 'FirstApp/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>
<!-- Page level plugins -->
<script src="{% static 'FirstApp/vendor/datatables/jquery.dataTables.min.js' %}"></script>
<script src="{% static 'FirstApp/vendor/datatables/dataTables.bootstrap4.min.js' %}"></script>
<!-- Page level custom scripts -->
<script src="{% static 'FirstApp/js/demo/datatables-demo.js' %}"></script>
<!-- Core plugin JavaScript-->
<script src="{% static 'FirstApp/vendor/jquery-easing/jquery.easing.min.js' %}"></script>
{% endblock %}
<div id="wrapper">
<!-- Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Begin Page Content -->
{% block 'container-fluid' %}
<div class="container-fluid">
{% load static %}
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Lecture Summarization</h1>
</div>
<!--first row -->
<div class="row p-2">
<!--first column -->
<div class="col-lg-6" style="overflow-x: scroll">
<div class="card shadow mb-4">
<!--card header -->
<div class="card-header py-3">
<h5 class="m-0 font-weight-bold text-primary">Remove Background noise</h5>
</div>
<!--card body -->
<div class="card-body">
{% if lecturer_subjects.count == 0 %}
<div class="text-center">
<span class="font-italic">No subjects</span>
</div>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment