Commit 39c91f5c authored by LiniEisha's avatar LiniEisha

Models

parent c955139a
...@@ -4,4 +4,6 @@ from django.contrib import admin ...@@ -4,4 +4,6 @@ from django.contrib import admin
from LectureSummarizingApp.models import * from LectureSummarizingApp.models import *
admin.site.register(LectureAudio) admin.site.register(LectureAudio)
admin.site.register(LectureAudioNoiseRemoved)
admin.site.register(LectureSpeechToText)
admin.site.register(LectureAudioSummary) admin.site.register(LectureAudioSummary)
...@@ -16,6 +16,29 @@ class LectureAudio (models.Model): ...@@ -16,6 +16,29 @@ class LectureAudio (models.Model):
def __str__(self): def __str__(self):
return self.lecture_audio_id 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): class LectureAudioSummary (models.Model):
lecture_audio_summary_id = models.CharField(max_length=10) lecture_audio_summary_id = models.CharField(max_length=10)
lecture_audio_id = models.ForeignKey(LectureAudio, on_delete=models.CASCADE) lecture_audio_id = models.ForeignKey(LectureAudio, on_delete=models.CASCADE)
...@@ -24,3 +47,4 @@ class LectureAudioSummary (models.Model): ...@@ -24,3 +47,4 @@ class LectureAudioSummary (models.Model):
def __str__(self): def __str__(self):
return self.lecture_audio_summary_id return self.lecture_audio_summary_id
...@@ -14,9 +14,25 @@ class LectureAudioSerializer(serializers.ModelSerializer): ...@@ -14,9 +14,25 @@ class LectureAudioSerializer(serializers.ModelSerializer):
fields = '__all__' fields = '__all__'
class LectureAudioSummarySerializer(serializers.ModelSerializer): class LectureAudioNoiseRemovedSerializer(serializers.ModelSerializer):
lecture_audio_id = LectureAudioSerializer() 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: class Meta:
model = LectureAudioSummary model = LectureAudioSummary
fields = '__all__' fields = '__all__'
\ No newline at end of file
...@@ -5,6 +5,63 @@ ...@@ -5,6 +5,63 @@
<title>Summarization</title> <title>Summarization</title>
</head> </head>
<body> <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> </body>
</html> </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