diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..926229b5e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Ignore virtual environments +.venv/ +venv/ \ No newline at end of file diff --git a/.gradio/certificate.pem b/.gradio/certificate.pem new file mode 100644 index 000000000..b85c8037f --- /dev/null +++ b/.gradio/certificate.pem @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw +TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh +cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4 +WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu +ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY +MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc +h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+ +0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U +A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW +T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH +B5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC +B5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf1b0SHzUv +KBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWn +OlFuhjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTn +jh8BCNAw1FtxNrQHusEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbw +qHyGO0aoSCqI3Haadr8faqU9GY/rOPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CI +rU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq +hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL +ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ +3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK +NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5 +ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur +TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC +jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc +oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq +4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA +mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d +emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc= +-----END CERTIFICATE----- diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..6f3a2913e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/AIPlanner/__init__.py b/AIPlanner/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/AIPlanner/__pycache__/__init__.cpython-311.pyc b/AIPlanner/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..86e566593 Binary files /dev/null and b/AIPlanner/__pycache__/__init__.cpython-311.pyc differ diff --git a/AIPlanner/__pycache__/__init__.cpython-312.pyc b/AIPlanner/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..154e45476 Binary files /dev/null and b/AIPlanner/__pycache__/__init__.cpython-312.pyc differ diff --git a/AIPlanner/__pycache__/__init__.cpython-313.pyc b/AIPlanner/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..bb1ae310a Binary files /dev/null and b/AIPlanner/__pycache__/__init__.cpython-313.pyc differ diff --git a/AIPlanner/__pycache__/__init__.cpython-39.pyc b/AIPlanner/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..0712305ff Binary files /dev/null and b/AIPlanner/__pycache__/__init__.cpython-39.pyc differ diff --git a/AIPlanner/__pycache__/admin.cpython-311.pyc b/AIPlanner/__pycache__/admin.cpython-311.pyc new file mode 100644 index 000000000..372d00631 Binary files /dev/null and b/AIPlanner/__pycache__/admin.cpython-311.pyc differ diff --git a/AIPlanner/__pycache__/admin.cpython-312.pyc b/AIPlanner/__pycache__/admin.cpython-312.pyc new file mode 100644 index 000000000..f1afaf82d Binary files /dev/null and b/AIPlanner/__pycache__/admin.cpython-312.pyc differ diff --git a/AIPlanner/__pycache__/admin.cpython-313.pyc b/AIPlanner/__pycache__/admin.cpython-313.pyc new file mode 100644 index 000000000..64ffca465 Binary files /dev/null and b/AIPlanner/__pycache__/admin.cpython-313.pyc differ diff --git a/AIPlanner/__pycache__/admin.cpython-39.pyc b/AIPlanner/__pycache__/admin.cpython-39.pyc new file mode 100644 index 000000000..f02ab9f36 Binary files /dev/null and b/AIPlanner/__pycache__/admin.cpython-39.pyc differ diff --git a/AIPlanner/__pycache__/apps.cpython-311.pyc b/AIPlanner/__pycache__/apps.cpython-311.pyc new file mode 100644 index 000000000..d616ad0d2 Binary files /dev/null and b/AIPlanner/__pycache__/apps.cpython-311.pyc differ diff --git a/AIPlanner/__pycache__/apps.cpython-312.pyc b/AIPlanner/__pycache__/apps.cpython-312.pyc new file mode 100644 index 000000000..d465e30b8 Binary files /dev/null and b/AIPlanner/__pycache__/apps.cpython-312.pyc differ diff --git a/AIPlanner/__pycache__/apps.cpython-313.pyc b/AIPlanner/__pycache__/apps.cpython-313.pyc new file mode 100644 index 000000000..bb2c0930f Binary files /dev/null and b/AIPlanner/__pycache__/apps.cpython-313.pyc differ diff --git a/AIPlanner/__pycache__/apps.cpython-39.pyc b/AIPlanner/__pycache__/apps.cpython-39.pyc new file mode 100644 index 000000000..4b1866e38 Binary files /dev/null and b/AIPlanner/__pycache__/apps.cpython-39.pyc differ diff --git a/AIPlanner/__pycache__/forms.cpython-311.pyc b/AIPlanner/__pycache__/forms.cpython-311.pyc new file mode 100644 index 000000000..47c884629 Binary files /dev/null and b/AIPlanner/__pycache__/forms.cpython-311.pyc differ diff --git a/AIPlanner/__pycache__/forms.cpython-312.pyc b/AIPlanner/__pycache__/forms.cpython-312.pyc new file mode 100644 index 000000000..97107f2c9 Binary files /dev/null and b/AIPlanner/__pycache__/forms.cpython-312.pyc differ diff --git a/AIPlanner/__pycache__/forms.cpython-313.pyc b/AIPlanner/__pycache__/forms.cpython-313.pyc new file mode 100644 index 000000000..a83de8386 Binary files /dev/null and b/AIPlanner/__pycache__/forms.cpython-313.pyc differ diff --git a/AIPlanner/__pycache__/forms.cpython-39.pyc b/AIPlanner/__pycache__/forms.cpython-39.pyc new file mode 100644 index 000000000..7b51a160e Binary files /dev/null and b/AIPlanner/__pycache__/forms.cpython-39.pyc differ diff --git a/AIPlanner/__pycache__/models.cpython-311.pyc b/AIPlanner/__pycache__/models.cpython-311.pyc new file mode 100644 index 000000000..b4f6bd137 Binary files /dev/null and b/AIPlanner/__pycache__/models.cpython-311.pyc differ diff --git a/AIPlanner/__pycache__/models.cpython-312.pyc b/AIPlanner/__pycache__/models.cpython-312.pyc new file mode 100644 index 000000000..93f124bba Binary files /dev/null and b/AIPlanner/__pycache__/models.cpython-312.pyc differ diff --git a/AIPlanner/__pycache__/models.cpython-313.pyc b/AIPlanner/__pycache__/models.cpython-313.pyc new file mode 100644 index 000000000..75424e13e Binary files /dev/null and b/AIPlanner/__pycache__/models.cpython-313.pyc differ diff --git a/AIPlanner/__pycache__/models.cpython-39.pyc b/AIPlanner/__pycache__/models.cpython-39.pyc new file mode 100644 index 000000000..0e275445e Binary files /dev/null and b/AIPlanner/__pycache__/models.cpython-39.pyc differ diff --git a/AIPlanner/__pycache__/urls.cpython-311.pyc b/AIPlanner/__pycache__/urls.cpython-311.pyc new file mode 100644 index 000000000..8488c3c12 Binary files /dev/null and b/AIPlanner/__pycache__/urls.cpython-311.pyc differ diff --git a/AIPlanner/__pycache__/urls.cpython-312.pyc b/AIPlanner/__pycache__/urls.cpython-312.pyc new file mode 100644 index 000000000..937c7da86 Binary files /dev/null and b/AIPlanner/__pycache__/urls.cpython-312.pyc differ diff --git a/AIPlanner/__pycache__/urls.cpython-313.pyc b/AIPlanner/__pycache__/urls.cpython-313.pyc new file mode 100644 index 000000000..78548d42f Binary files /dev/null and b/AIPlanner/__pycache__/urls.cpython-313.pyc differ diff --git a/AIPlanner/__pycache__/urls.cpython-39.pyc b/AIPlanner/__pycache__/urls.cpython-39.pyc new file mode 100644 index 000000000..b0569e787 Binary files /dev/null and b/AIPlanner/__pycache__/urls.cpython-39.pyc differ diff --git a/AIPlanner/__pycache__/views.cpython-311.pyc b/AIPlanner/__pycache__/views.cpython-311.pyc new file mode 100644 index 000000000..5468f74b3 Binary files /dev/null and b/AIPlanner/__pycache__/views.cpython-311.pyc differ diff --git a/AIPlanner/__pycache__/views.cpython-312.pyc b/AIPlanner/__pycache__/views.cpython-312.pyc new file mode 100644 index 000000000..9283df7f1 Binary files /dev/null and b/AIPlanner/__pycache__/views.cpython-312.pyc differ diff --git a/AIPlanner/__pycache__/views.cpython-313.pyc b/AIPlanner/__pycache__/views.cpython-313.pyc new file mode 100644 index 000000000..1e282cd7a Binary files /dev/null and b/AIPlanner/__pycache__/views.cpython-313.pyc differ diff --git a/AIPlanner/__pycache__/views.cpython-39.pyc b/AIPlanner/__pycache__/views.cpython-39.pyc new file mode 100644 index 000000000..431e1374f Binary files /dev/null and b/AIPlanner/__pycache__/views.cpython-39.pyc differ diff --git a/AIPlanner/admin.py b/AIPlanner/admin.py new file mode 100644 index 000000000..8c38f3f3d --- /dev/null +++ b/AIPlanner/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/AIPlanner/apps.py b/AIPlanner/apps.py new file mode 100644 index 000000000..8724ad6af --- /dev/null +++ b/AIPlanner/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AiplannerConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'AIPlanner' diff --git a/AIPlanner/forms.py b/AIPlanner/forms.py new file mode 100644 index 000000000..ead2dbab0 --- /dev/null +++ b/AIPlanner/forms.py @@ -0,0 +1,19 @@ +# ai model -> data from -> their interst in learing -> uske baad course and games suggest krega -> uske hisab se vo course kitne month me ho sakta hai and daily plan bana kr dega ki kitna ho sakta hai -> daily plan and practice schedule and suggestions +from django import forms + +class userForm(forms.Form): + pass + +class RequestForm(forms.Form): + skill_level = forms.ChoiceField(choices=[ + ('Beginner', 'Beginner'), + ('Intermediate', 'Intermediate'), + ('Advanced', 'Advanced') + ]) + learning_speed = forms.ChoiceField(choices=[ + ('Slow', 'Slow'), + ('Moderate', 'Moderate'), + ('Fast', 'Fast') + ]) + daily_hours = forms.IntegerField(min_value=1) + preferred_days = forms.CharField() \ No newline at end of file diff --git a/AIPlanner/middleware.py b/AIPlanner/middleware.py new file mode 100644 index 000000000..dc2039807 --- /dev/null +++ b/AIPlanner/middleware.py @@ -0,0 +1,19 @@ +from django.http import HttpResponse + +class SimpleCorsMiddleware: + def __init__(self, get_response): + self.get_response = get_response + + def __call__(self, request): + # Handle OPTIONS method to handle preflight requests + if request.method == 'OPTIONS': + response = HttpResponse(status=200) + else: + response = self.get_response(request) + + # Add CORS headers + response['Access-Control-Allow-Origin'] = '*' # Allows all domains + response['Access-Control-Allow-Methods'] = 'GET, POST, OPTIONS' + response['Access-Control-Allow-Headers'] = 'Content-Type, Authorization' + + return response diff --git a/AIPlanner/migrations/0001_initial.py b/AIPlanner/migrations/0001_initial.py new file mode 100644 index 000000000..d5ca4f99c --- /dev/null +++ b/AIPlanner/migrations/0001_initial.py @@ -0,0 +1,64 @@ +# Generated by Django 4.2.20 on 2025-03-29 18:58 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('gamification', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Course', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('difficulty_level', models.CharField(choices=[('Beginner', 'Beginner'), ('Intermediate', 'Intermediate'), ('Advanced', 'Advanced')], max_length=20)), + ('description', models.TextField()), + ('topics_and_hours', models.JSONField(default=dict)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='StudySchedule', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('skill_level', models.CharField(max_length=20)), + ('learning_speed', models.CharField(max_length=10)), + ('daily_hours', models.IntegerField()), + ('preferred_days', models.JSONField(default=list)), + ('generated_study_plan', models.TextField(blank=True, null=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='ExtendedUserProfile', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('skill_level', models.CharField(choices=[('Beginner', 'Beginner'), ('Intermediate', 'Intermediate'), ('Advanced', 'Advanced')], max_length=20)), + ('learning_speed', models.CharField(choices=[('Slow', 'Slow'), ('Moderate', 'Moderate'), ('Fast', 'Fast')], max_length=10)), + ('daily_hours', models.IntegerField(default=2)), + ('preferred_days', models.JSONField(default=list)), + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Exercise', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('description', models.TextField()), + ('difficulty_level', models.CharField(choices=[('Beginner', 'Beginner'), ('Intermediate', 'Intermediate'), ('Advanced', 'Advanced')], max_length=20)), + ('exercises_and_hours', models.JSONField()), + ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='exercises', to='gamification.quiz')), + ], + ), + ] diff --git a/AIPlanner/migrations/0002_alter_exercise_course.py b/AIPlanner/migrations/0002_alter_exercise_course.py new file mode 100644 index 000000000..c2d36b05c --- /dev/null +++ b/AIPlanner/migrations/0002_alter_exercise_course.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.20 on 2025-03-29 21:17 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('AIPlanner', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='exercise', + name='course', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='exercises', to='AIPlanner.course'), + ), + ] diff --git a/AIPlanner/migrations/__init__.py b/AIPlanner/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/AIPlanner/migrations/__pycache__/0001_initial.cpython-311.pyc b/AIPlanner/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 000000000..7a1ccd391 Binary files /dev/null and b/AIPlanner/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/AIPlanner/migrations/__pycache__/0001_initial.cpython-312.pyc b/AIPlanner/migrations/__pycache__/0001_initial.cpython-312.pyc new file mode 100644 index 000000000..603128da8 Binary files /dev/null and b/AIPlanner/migrations/__pycache__/0001_initial.cpython-312.pyc differ diff --git a/AIPlanner/migrations/__pycache__/0001_initial.cpython-313.pyc b/AIPlanner/migrations/__pycache__/0001_initial.cpython-313.pyc new file mode 100644 index 000000000..dba31df06 Binary files /dev/null and b/AIPlanner/migrations/__pycache__/0001_initial.cpython-313.pyc differ diff --git a/AIPlanner/migrations/__pycache__/0001_initial.cpython-39.pyc b/AIPlanner/migrations/__pycache__/0001_initial.cpython-39.pyc new file mode 100644 index 000000000..1a8989419 Binary files /dev/null and b/AIPlanner/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-311.pyc b/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-311.pyc new file mode 100644 index 000000000..c8bf4e172 Binary files /dev/null and b/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-311.pyc differ diff --git a/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-312.pyc b/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-312.pyc new file mode 100644 index 000000000..4d21fc513 Binary files /dev/null and b/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-312.pyc differ diff --git a/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-313.pyc b/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-313.pyc new file mode 100644 index 000000000..1a2ea0f93 Binary files /dev/null and b/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-313.pyc differ diff --git a/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-39.pyc b/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-39.pyc new file mode 100644 index 000000000..4420d240a Binary files /dev/null and b/AIPlanner/migrations/__pycache__/0002_alter_exercise_course.cpython-39.pyc differ diff --git a/AIPlanner/migrations/__pycache__/__init__.cpython-311.pyc b/AIPlanner/migrations/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..37074184f Binary files /dev/null and b/AIPlanner/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/AIPlanner/migrations/__pycache__/__init__.cpython-312.pyc b/AIPlanner/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..cf7b5dd30 Binary files /dev/null and b/AIPlanner/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/AIPlanner/migrations/__pycache__/__init__.cpython-313.pyc b/AIPlanner/migrations/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..f56303ea7 Binary files /dev/null and b/AIPlanner/migrations/__pycache__/__init__.cpython-313.pyc differ diff --git a/AIPlanner/migrations/__pycache__/__init__.cpython-39.pyc b/AIPlanner/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..6d16fb31e Binary files /dev/null and b/AIPlanner/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/AIPlanner/models.py b/AIPlanner/models.py new file mode 100644 index 000000000..e4292758f --- /dev/null +++ b/AIPlanner/models.py @@ -0,0 +1,81 @@ +import datetime +from django.db import models +from django.contrib.auth import get_user_model +from gamification.models import Quiz +from Dashboard.models import CustomUser + +User = get_user_model() + +# Extended User Profile Model +class ExtendedUserProfile(models.Model): + user = models.OneToOneField(CustomUser, on_delete=models.CASCADE) + skill_level = models.CharField( + max_length=20, + choices=[('Beginner', 'Beginner'), ('Intermediate', 'Intermediate'), ('Advanced', 'Advanced')] + ) + learning_speed = models.CharField( + max_length=10, + choices=[('Slow', 'Slow'), ('Moderate', 'Moderate'), ('Fast', 'Fast')] + ) + daily_hours = models.IntegerField(default=2) + preferred_days = models.JSONField(default=list) # Example: ['Monday', 'Wednesday', 'Friday'] + + def __str__(self): + return f"{self.user.name}'s Profile" + +class Course(models.Model): + name = models.CharField(max_length=255) + difficulty_level = models.CharField(max_length=20, choices=[('Beginner', 'Beginner'), ('Intermediate', 'Intermediate'), ('Advanced', 'Advanced')]) + description = models.TextField() + topics_and_hours = models.JSONField(default=dict) # Format: { "Topic Name": hours } + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.name + +class Exercise(models.Model): + course = models.ForeignKey(Course, related_name='exercises', on_delete=models.CASCADE) + name = models.CharField(max_length=255) + description = models.TextField() + difficulty_level = models.CharField(max_length=20, choices=[('Beginner', 'Beginner'), ('Intermediate', 'Intermediate'), ('Advanced', 'Advanced')]) + exercises_and_hours = models.JSONField() + + def __str__(self): + return self.name + +# Study Schedule Model +class StudySchedule(models.Model): + user = models.ForeignKey(CustomUser, on_delete=models.CASCADE) + skill_level = models.CharField(max_length=20) + learning_speed = models.CharField(max_length=10) + daily_hours = models.IntegerField() + preferred_days = models.JSONField(default=list) + generated_study_plan = models.TextField(null=True, blank=True) + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return f"{self.user.username}'s Study Schedule" + + def calculate_completion_date(self): + user_profile = ExtendedUserProfile.objects.get(user=self.user) + total_hours = self.course.estimated_hours + daily_hours = user_profile.daily_hours + days_needed = total_hours / daily_hours + today = datetime.date.today() + + preferred_days = user_profile.preferred_days + delta = datetime.timedelta(days=1) + count = 0 + completion_date = today + + while count < days_needed: + completion_date += delta + if completion_date.strftime('%A') in preferred_days: + count += 1 + + return completion_date + + def save(self, *args, **kwargs): + if not self.completion_date: + self.completion_date = self.calculate_completion_date() + super().save(*args, **kwargs) diff --git a/AIPlanner/templates/study_plan_form.html b/AIPlanner/templates/study_plan_form.html new file mode 100644 index 000000000..b6b580dc9 --- /dev/null +++ b/AIPlanner/templates/study_plan_form.html @@ -0,0 +1,249 @@ + + + + + + Study Plan Generator + + + +

Generate Your Study Plan

+ +
+ {% csrf_token %} + + + + + + + + + + + + + +
+ +
+ + + + diff --git a/AIPlanner/templates/study_plan_result.html b/AIPlanner/templates/study_plan_result.html new file mode 100644 index 000000000..844cac5e6 --- /dev/null +++ b/AIPlanner/templates/study_plan_result.html @@ -0,0 +1,9 @@ +

Your Generated Study Plan

+{% if study_plan %} +
{{ study_plan }}
+{% else %} +

No study plan generated yet.

+{% endif %} + +

Estimated Completion Date

+

{{ completion_date }}

diff --git a/AIPlanner/tests.py b/AIPlanner/tests.py new file mode 100644 index 000000000..7ce503c2d --- /dev/null +++ b/AIPlanner/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/AIPlanner/urls.py b/AIPlanner/urls.py new file mode 100644 index 000000000..9ac0b29f9 --- /dev/null +++ b/AIPlanner/urls.py @@ -0,0 +1,9 @@ +from django.urls import path +from . import views + +app_name = 'AIPlanner' + +urlpatterns = [ + path('process_user_input/', views.process_user_input, name='process_user_input'), + path('generate-study-plan/', views.generate_study_plan_view, name='generate_study_plan'), +] diff --git a/AIPlanner/views.py b/AIPlanner/views.py new file mode 100644 index 000000000..b595daf70 --- /dev/null +++ b/AIPlanner/views.py @@ -0,0 +1,132 @@ +import requests +import json +import urllib.request +import json +from django.contrib.auth.decorators import login_required +import requests +from django.shortcuts import render +from django.http import JsonResponse +from .models import ExtendedUserProfile, StudySchedule, Course, Exercise +from datetime import timedelta +import logging +from .forms import RequestForm + +# Configure logging +logging.basicConfig(filename='debug.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') + +def calculate_total_study_hours(user_profile): + skill_level = user_profile.skill_level + courses = Course.objects.filter(difficulty_level=skill_level) + total_hours = sum( + sum(course.topics_and_hours.values()) + sum(ex.estimated_time for ex in Exercise.objects.filter(course=course)) + for course in courses + ) + return total_hours + +def generate_study_plan(user_profile, courses, exercises): + workflow_url = 'https://quizzical-cohen-angry.lemme.cloud/api/99532368-3fcd-48ea-8aeb-73a42b293026' + + print("I'm here!!") + print(user_profile.skill_level, user_profile.learning_speed, user_profile.daily_hours, user_profile.preferred_days) + + data = { + "daily_hours": user_profile.daily_hours, + "skill_level": user_profile.skill_level, + "learning_speed": user_profile.learning_speed, + "preferred_days": user_profile.preferred_days, + "courses": [course.name for course in courses], + "exercises": ['MCQ'], + # "exercises": [exercise.name for exercise in exercises] + } + + json_data = json.dumps(data).encode("utf-8") + print("YEAAAAAAA", json_data) + req = urllib.request.Request(workflow_url, data=json_data, headers={"Content-Type": "application/json"}, method="POST") + print(req, req.data, req.headers) + + try: + with urllib.request.urlopen(req) as response: + response_data = response.read().decode() + logging.debug("Trigger Block Response: %s", response_data) # Log response + return json.loads(response_data) + except urllib.error.HTTPError as e: + print(e.code, e.reason) + print(e) + error_details = e.read().decode() + logging.error("HTTPError: %s, Details: %s", e.code, error_details) # Log HTTP error + return {'error': f'HTTP error occurred: {e.code}'} + except urllib.error.URLError as e: + logging.error("URLError: %s", e.reason) # Log URL error + return {'error': f'URL error occurred: {e.reason}'} + except Exception as e: + logging.exception("Unexpected Error") # Log generic errors + return {'error': f'An error occurred: {str(e)}'} + + +@login_required(login_url='/login/') +def process_user_input(request): + if request.method == "POST": + user = request.user + user_profile, _ = ExtendedUserProfile.objects.get_or_create(user=user) + + user_profile.skill_level = request.POST.get('skill_level') + user_profile.learning_speed = request.POST.get('learning_speed') + user_profile.daily_hours = int(request.POST.get('daily_hours', 2)) + user_profile.preferred_days = request.POST.getlist('preferred_days') + user_profile.save() + + courses = Course.objects.filter(difficulty_level=user_profile.skill_level) + exercises = Exercise.objects.filter(course__in=courses) + + total_study_hours = calculate_total_study_hours(user_profile) + print("----->", user_profile.skill_level, user_profile.learning_speed, user_profile.daily_hours, user_profile.preferred_days) + study_plan = generate_study_plan(user_profile, courses, exercises) + + study_schedule = StudySchedule.objects.create( + user=user, + skill_level=user_profile.skill_level, + learning_speed=user_profile.learning_speed, + daily_hours=user_profile.daily_hours, + preferred_days=user_profile.preferred_days, + generated_study_plan=study_plan + ) + + completion_date = study_schedule.calculate_completion_date(total_study_hours) + + return render(request, "study_plan_result.html", {"study_plan": study_plan, "completion_date": completion_date}) + + return render(request, "study_plan_form.html") + + +@login_required(login_url='/login/') +def generate_study_plan_view(request): + if request.method == "POST": + print("Session ID:", request.session.session_key) + print("User:", request.user) + print("Is authenticated:", request.user.is_authenticated) + print("Cookies:", request.COOKIES) + user = request.user + print("User:", user) + user_profile, created = ExtendedUserProfile.objects.get_or_create(user=user) + + body_unicode = request.body.decode('utf-8') + body = json.loads(body_unicode) + print(body) + + user_profile.skill_level = body['skill_level'] + user_profile.learning_speed = body['learning_speed'] + user_profile.daily_hours = int(body['daily_hours']) + user_profile.preferred_days = [i.strip() for i in body['preferred_days'].split(',')] + user_profile.save() + + print("User Profile:", user_profile) + + courses = Course.objects.filter(difficulty_level=user_profile.skill_level) + exercises = Exercise.objects.filter(course__in=courses) + + print("---------->", user_profile.skill_level, user_profile.learning_speed, user_profile.daily_hours, user_profile.preferred_days) + study_plan = generate_study_plan(user_profile, courses, exercises) + + return JsonResponse({"study_plan": study_plan}) + + return JsonResponse({"error": "Invalid request method"}, status=400) diff --git a/Courses/__init__.py b/Courses/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/Courses/__pycache__/__init__.cpython-311.pyc b/Courses/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..84d782bd4 Binary files /dev/null and b/Courses/__pycache__/__init__.cpython-311.pyc differ diff --git a/Courses/__pycache__/__init__.cpython-312.pyc b/Courses/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..bb467293a Binary files /dev/null and b/Courses/__pycache__/__init__.cpython-312.pyc differ diff --git a/Courses/__pycache__/__init__.cpython-313.pyc b/Courses/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..04f51e624 Binary files /dev/null and b/Courses/__pycache__/__init__.cpython-313.pyc differ diff --git a/Courses/__pycache__/__init__.cpython-39.pyc b/Courses/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..26117e0fd Binary files /dev/null and b/Courses/__pycache__/__init__.cpython-39.pyc differ diff --git a/Courses/__pycache__/admin.cpython-311.pyc b/Courses/__pycache__/admin.cpython-311.pyc new file mode 100644 index 000000000..d0a1289d2 Binary files /dev/null and b/Courses/__pycache__/admin.cpython-311.pyc differ diff --git a/Courses/__pycache__/admin.cpython-312.pyc b/Courses/__pycache__/admin.cpython-312.pyc new file mode 100644 index 000000000..5ee21f2db Binary files /dev/null and b/Courses/__pycache__/admin.cpython-312.pyc differ diff --git a/Courses/__pycache__/admin.cpython-313.pyc b/Courses/__pycache__/admin.cpython-313.pyc new file mode 100644 index 000000000..128e7d138 Binary files /dev/null and b/Courses/__pycache__/admin.cpython-313.pyc differ diff --git a/Courses/__pycache__/admin.cpython-39.pyc b/Courses/__pycache__/admin.cpython-39.pyc new file mode 100644 index 000000000..94ef3e736 Binary files /dev/null and b/Courses/__pycache__/admin.cpython-39.pyc differ diff --git a/Courses/__pycache__/apps.cpython-311.pyc b/Courses/__pycache__/apps.cpython-311.pyc new file mode 100644 index 000000000..119f3ae37 Binary files /dev/null and b/Courses/__pycache__/apps.cpython-311.pyc differ diff --git a/Courses/__pycache__/apps.cpython-312.pyc b/Courses/__pycache__/apps.cpython-312.pyc new file mode 100644 index 000000000..3f2ecb8c8 Binary files /dev/null and b/Courses/__pycache__/apps.cpython-312.pyc differ diff --git a/Courses/__pycache__/apps.cpython-313.pyc b/Courses/__pycache__/apps.cpython-313.pyc new file mode 100644 index 000000000..ed3277221 Binary files /dev/null and b/Courses/__pycache__/apps.cpython-313.pyc differ diff --git a/Courses/__pycache__/apps.cpython-39.pyc b/Courses/__pycache__/apps.cpython-39.pyc new file mode 100644 index 000000000..7e865ca41 Binary files /dev/null and b/Courses/__pycache__/apps.cpython-39.pyc differ diff --git a/Courses/__pycache__/models.cpython-311.pyc b/Courses/__pycache__/models.cpython-311.pyc new file mode 100644 index 000000000..457680ee4 Binary files /dev/null and b/Courses/__pycache__/models.cpython-311.pyc differ diff --git a/Courses/__pycache__/models.cpython-312.pyc b/Courses/__pycache__/models.cpython-312.pyc new file mode 100644 index 000000000..f6ece0a88 Binary files /dev/null and b/Courses/__pycache__/models.cpython-312.pyc differ diff --git a/Courses/__pycache__/models.cpython-313.pyc b/Courses/__pycache__/models.cpython-313.pyc new file mode 100644 index 000000000..c3432c713 Binary files /dev/null and b/Courses/__pycache__/models.cpython-313.pyc differ diff --git a/Courses/__pycache__/models.cpython-39.pyc b/Courses/__pycache__/models.cpython-39.pyc new file mode 100644 index 000000000..de61aecf5 Binary files /dev/null and b/Courses/__pycache__/models.cpython-39.pyc differ diff --git a/Courses/admin.py b/Courses/admin.py new file mode 100644 index 000000000..8c38f3f3d --- /dev/null +++ b/Courses/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/Courses/apps.py b/Courses/apps.py new file mode 100644 index 000000000..937ad9081 --- /dev/null +++ b/Courses/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class CoursesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'Courses' diff --git a/Courses/migrations/0001_initial.py b/Courses/migrations/0001_initial.py new file mode 100644 index 000000000..d3e68a280 --- /dev/null +++ b/Courses/migrations/0001_initial.py @@ -0,0 +1,25 @@ +# Generated by Django 5.1.7 on 2025-03-29 09:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Course', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('difficulty_level', models.CharField(choices=[('Beginner', 'Beginner'), ('Intermediate', 'Intermediate'), ('Advanced', 'Advanced')], max_length=20)), + ('description', models.TextField()), + ('topics', models.TextField()), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + ), + ] diff --git a/Courses/migrations/0002_remove_course_created_at_and_more.py b/Courses/migrations/0002_remove_course_created_at_and_more.py new file mode 100644 index 000000000..f8062cbac --- /dev/null +++ b/Courses/migrations/0002_remove_course_created_at_and_more.py @@ -0,0 +1,22 @@ +# Generated by Django 5.1.7 on 2025-03-29 09:52 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('Courses', '0001_initial'), + ] + + operations = [ + migrations.RemoveField( + model_name='course', + name='created_at', + ), + migrations.AlterField( + model_name='course', + name='difficulty_level', + field=models.CharField(max_length=50), + ), + ] diff --git a/Courses/migrations/__init__.py b/Courses/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/Courses/migrations/__pycache__/0001_initial.cpython-311.pyc b/Courses/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 000000000..33676d313 Binary files /dev/null and b/Courses/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/Courses/migrations/__pycache__/0001_initial.cpython-312.pyc b/Courses/migrations/__pycache__/0001_initial.cpython-312.pyc new file mode 100644 index 000000000..960e18cf8 Binary files /dev/null and b/Courses/migrations/__pycache__/0001_initial.cpython-312.pyc differ diff --git a/Courses/migrations/__pycache__/0001_initial.cpython-313.pyc b/Courses/migrations/__pycache__/0001_initial.cpython-313.pyc new file mode 100644 index 000000000..48aa779af Binary files /dev/null and b/Courses/migrations/__pycache__/0001_initial.cpython-313.pyc differ diff --git a/Courses/migrations/__pycache__/0001_initial.cpython-39.pyc b/Courses/migrations/__pycache__/0001_initial.cpython-39.pyc new file mode 100644 index 000000000..2ce7bb494 Binary files /dev/null and b/Courses/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-311.pyc b/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-311.pyc new file mode 100644 index 000000000..bf5590a35 Binary files /dev/null and b/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-311.pyc differ diff --git a/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-312.pyc b/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-312.pyc new file mode 100644 index 000000000..cc83e7cde Binary files /dev/null and b/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-312.pyc differ diff --git a/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-313.pyc b/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-313.pyc new file mode 100644 index 000000000..11f0c07d9 Binary files /dev/null and b/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-313.pyc differ diff --git a/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-39.pyc b/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-39.pyc new file mode 100644 index 000000000..67566f740 Binary files /dev/null and b/Courses/migrations/__pycache__/0002_remove_course_created_at_and_more.cpython-39.pyc differ diff --git a/Courses/migrations/__pycache__/__init__.cpython-311.pyc b/Courses/migrations/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..64f0655ee Binary files /dev/null and b/Courses/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/Courses/migrations/__pycache__/__init__.cpython-312.pyc b/Courses/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..19698e9e8 Binary files /dev/null and b/Courses/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/Courses/migrations/__pycache__/__init__.cpython-313.pyc b/Courses/migrations/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..39b7c9ddf Binary files /dev/null and b/Courses/migrations/__pycache__/__init__.cpython-313.pyc differ diff --git a/Courses/migrations/__pycache__/__init__.cpython-39.pyc b/Courses/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..379b9cc05 Binary files /dev/null and b/Courses/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/Courses/models.py b/Courses/models.py new file mode 100644 index 000000000..ba0f17bd5 --- /dev/null +++ b/Courses/models.py @@ -0,0 +1,14 @@ +from django.db import models + +# Create your models here. + +from django.db import models + +class Course(models.Model): + name = models.CharField(max_length=255) + difficulty_level = models.CharField(max_length=50) + description = models.TextField() + topics = models.TextField() + + def __str__(self): + return self.name diff --git a/Courses/tests.py b/Courses/tests.py new file mode 100644 index 000000000..7ce503c2d --- /dev/null +++ b/Courses/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/Courses/views.py b/Courses/views.py new file mode 100644 index 000000000..91ea44a21 --- /dev/null +++ b/Courses/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/Cream and Beige Simple Clean Project Overview Presentation.pdf b/Cream and Beige Simple Clean Project Overview Presentation.pdf new file mode 100644 index 000000000..5c64337c6 Binary files /dev/null and b/Cream and Beige Simple Clean Project Overview Presentation.pdf differ diff --git a/Dashboard/__init__.py b/Dashboard/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/Dashboard/__pycache__/__init__.cpython-311.pyc b/Dashboard/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..0ca4c8aff Binary files /dev/null and b/Dashboard/__pycache__/__init__.cpython-311.pyc differ diff --git a/Dashboard/__pycache__/__init__.cpython-312.pyc b/Dashboard/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..5be8a64d2 Binary files /dev/null and b/Dashboard/__pycache__/__init__.cpython-312.pyc differ diff --git a/Dashboard/__pycache__/__init__.cpython-313.pyc b/Dashboard/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..55048be4b Binary files /dev/null and b/Dashboard/__pycache__/__init__.cpython-313.pyc differ diff --git a/Dashboard/__pycache__/__init__.cpython-39.pyc b/Dashboard/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..43c03237c Binary files /dev/null and b/Dashboard/__pycache__/__init__.cpython-39.pyc differ diff --git a/Dashboard/__pycache__/admin.cpython-311.pyc b/Dashboard/__pycache__/admin.cpython-311.pyc new file mode 100644 index 000000000..8af2368bf Binary files /dev/null and b/Dashboard/__pycache__/admin.cpython-311.pyc differ diff --git a/Dashboard/__pycache__/admin.cpython-312.pyc b/Dashboard/__pycache__/admin.cpython-312.pyc new file mode 100644 index 000000000..2a5007741 Binary files /dev/null and b/Dashboard/__pycache__/admin.cpython-312.pyc differ diff --git a/Dashboard/__pycache__/admin.cpython-313.pyc b/Dashboard/__pycache__/admin.cpython-313.pyc new file mode 100644 index 000000000..29ddd6ef3 Binary files /dev/null and b/Dashboard/__pycache__/admin.cpython-313.pyc differ diff --git a/Dashboard/__pycache__/admin.cpython-39.pyc b/Dashboard/__pycache__/admin.cpython-39.pyc new file mode 100644 index 000000000..ad0f1a508 Binary files /dev/null and b/Dashboard/__pycache__/admin.cpython-39.pyc differ diff --git a/Dashboard/__pycache__/apps.cpython-311.pyc b/Dashboard/__pycache__/apps.cpython-311.pyc new file mode 100644 index 000000000..11d34c41a Binary files /dev/null and b/Dashboard/__pycache__/apps.cpython-311.pyc differ diff --git a/Dashboard/__pycache__/apps.cpython-312.pyc b/Dashboard/__pycache__/apps.cpython-312.pyc new file mode 100644 index 000000000..374120271 Binary files /dev/null and b/Dashboard/__pycache__/apps.cpython-312.pyc differ diff --git a/Dashboard/__pycache__/apps.cpython-313.pyc b/Dashboard/__pycache__/apps.cpython-313.pyc new file mode 100644 index 000000000..9414e8cb4 Binary files /dev/null and b/Dashboard/__pycache__/apps.cpython-313.pyc differ diff --git a/Dashboard/__pycache__/apps.cpython-39.pyc b/Dashboard/__pycache__/apps.cpython-39.pyc new file mode 100644 index 000000000..e747263cc Binary files /dev/null and b/Dashboard/__pycache__/apps.cpython-39.pyc differ diff --git a/Dashboard/__pycache__/forms.cpython-311.pyc b/Dashboard/__pycache__/forms.cpython-311.pyc new file mode 100644 index 000000000..0c58285da Binary files /dev/null and b/Dashboard/__pycache__/forms.cpython-311.pyc differ diff --git a/Dashboard/__pycache__/forms.cpython-312.pyc b/Dashboard/__pycache__/forms.cpython-312.pyc new file mode 100644 index 000000000..615298e30 Binary files /dev/null and b/Dashboard/__pycache__/forms.cpython-312.pyc differ diff --git a/Dashboard/__pycache__/forms.cpython-313.pyc b/Dashboard/__pycache__/forms.cpython-313.pyc new file mode 100644 index 000000000..0915a7deb Binary files /dev/null and b/Dashboard/__pycache__/forms.cpython-313.pyc differ diff --git a/Dashboard/__pycache__/forms.cpython-39.pyc b/Dashboard/__pycache__/forms.cpython-39.pyc new file mode 100644 index 000000000..1f70b99cd Binary files /dev/null and b/Dashboard/__pycache__/forms.cpython-39.pyc differ diff --git a/Dashboard/__pycache__/models.cpython-311.pyc b/Dashboard/__pycache__/models.cpython-311.pyc new file mode 100644 index 000000000..40c01a326 Binary files /dev/null and b/Dashboard/__pycache__/models.cpython-311.pyc differ diff --git a/Dashboard/__pycache__/models.cpython-312.pyc b/Dashboard/__pycache__/models.cpython-312.pyc new file mode 100644 index 000000000..c54c53c37 Binary files /dev/null and b/Dashboard/__pycache__/models.cpython-312.pyc differ diff --git a/Dashboard/__pycache__/models.cpython-313.pyc b/Dashboard/__pycache__/models.cpython-313.pyc new file mode 100644 index 000000000..1353256ca Binary files /dev/null and b/Dashboard/__pycache__/models.cpython-313.pyc differ diff --git a/Dashboard/__pycache__/models.cpython-39.pyc b/Dashboard/__pycache__/models.cpython-39.pyc new file mode 100644 index 000000000..0fdf47099 Binary files /dev/null and b/Dashboard/__pycache__/models.cpython-39.pyc differ diff --git a/Dashboard/__pycache__/urls.cpython-311.pyc b/Dashboard/__pycache__/urls.cpython-311.pyc new file mode 100644 index 000000000..d633980fa Binary files /dev/null and b/Dashboard/__pycache__/urls.cpython-311.pyc differ diff --git a/Dashboard/__pycache__/urls.cpython-312.pyc b/Dashboard/__pycache__/urls.cpython-312.pyc new file mode 100644 index 000000000..d3840a067 Binary files /dev/null and b/Dashboard/__pycache__/urls.cpython-312.pyc differ diff --git a/Dashboard/__pycache__/urls.cpython-313.pyc b/Dashboard/__pycache__/urls.cpython-313.pyc new file mode 100644 index 000000000..e07ea6664 Binary files /dev/null and b/Dashboard/__pycache__/urls.cpython-313.pyc differ diff --git a/Dashboard/__pycache__/urls.cpython-39.pyc b/Dashboard/__pycache__/urls.cpython-39.pyc new file mode 100644 index 000000000..2b0eb6776 Binary files /dev/null and b/Dashboard/__pycache__/urls.cpython-39.pyc differ diff --git a/Dashboard/__pycache__/views.cpython-311.pyc b/Dashboard/__pycache__/views.cpython-311.pyc new file mode 100644 index 000000000..68087d5d8 Binary files /dev/null and b/Dashboard/__pycache__/views.cpython-311.pyc differ diff --git a/Dashboard/__pycache__/views.cpython-312.pyc b/Dashboard/__pycache__/views.cpython-312.pyc new file mode 100644 index 000000000..3aa032746 Binary files /dev/null and b/Dashboard/__pycache__/views.cpython-312.pyc differ diff --git a/Dashboard/__pycache__/views.cpython-313.pyc b/Dashboard/__pycache__/views.cpython-313.pyc new file mode 100644 index 000000000..fe2352a3e Binary files /dev/null and b/Dashboard/__pycache__/views.cpython-313.pyc differ diff --git a/Dashboard/__pycache__/views.cpython-39.pyc b/Dashboard/__pycache__/views.cpython-39.pyc new file mode 100644 index 000000000..a45c0954c Binary files /dev/null and b/Dashboard/__pycache__/views.cpython-39.pyc differ diff --git a/Dashboard/admin.py b/Dashboard/admin.py new file mode 100644 index 000000000..8c38f3f3d --- /dev/null +++ b/Dashboard/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/Dashboard/apps.py b/Dashboard/apps.py new file mode 100644 index 000000000..99a3c0a15 --- /dev/null +++ b/Dashboard/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class DashboardConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'Dashboard' diff --git a/Dashboard/forms.py b/Dashboard/forms.py new file mode 100644 index 000000000..23db037a8 --- /dev/null +++ b/Dashboard/forms.py @@ -0,0 +1,17 @@ +from django import forms +from django.contrib.auth.forms import UserCreationForm, AuthenticationForm +from .models import CustomUser + +# Signup Form +class SignupForm(UserCreationForm): + email = forms.EmailField() + name = forms.CharField(max_length=100) + age = forms.IntegerField() + + class Meta: + model = CustomUser + fields = ["name", "age", "email", "password1", "password2"] + +# Login Form +class LoginForm(AuthenticationForm): + username = forms.EmailField(label="Email") diff --git a/Dashboard/migrations/0001_initial.py b/Dashboard/migrations/0001_initial.py new file mode 100644 index 000000000..43cefe996 --- /dev/null +++ b/Dashboard/migrations/0001_initial.py @@ -0,0 +1,34 @@ +# Generated by Django 4.2.20 on 2025-03-28 16:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ] + + operations = [ + migrations.CreateModel( + name='CustomUser', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('email', models.EmailField(max_length=254, unique=True)), + ('name', models.CharField(max_length=100)), + ('age', models.IntegerField()), + ('is_active', models.BooleanField(default=True)), + ('is_staff', models.BooleanField(default=False)), + ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), + ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), + ], + options={ + 'abstract': False, + }, + ), + ] diff --git a/Dashboard/migrations/__init__.py b/Dashboard/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/Dashboard/migrations/__pycache__/0001_initial.cpython-311.pyc b/Dashboard/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 000000000..089680342 Binary files /dev/null and b/Dashboard/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/Dashboard/migrations/__pycache__/0001_initial.cpython-312.pyc b/Dashboard/migrations/__pycache__/0001_initial.cpython-312.pyc new file mode 100644 index 000000000..3b521f395 Binary files /dev/null and b/Dashboard/migrations/__pycache__/0001_initial.cpython-312.pyc differ diff --git a/Dashboard/migrations/__pycache__/0001_initial.cpython-313.pyc b/Dashboard/migrations/__pycache__/0001_initial.cpython-313.pyc new file mode 100644 index 000000000..80f564130 Binary files /dev/null and b/Dashboard/migrations/__pycache__/0001_initial.cpython-313.pyc differ diff --git a/Dashboard/migrations/__pycache__/0001_initial.cpython-39.pyc b/Dashboard/migrations/__pycache__/0001_initial.cpython-39.pyc new file mode 100644 index 000000000..0fe9cdbad Binary files /dev/null and b/Dashboard/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/Dashboard/migrations/__pycache__/__init__.cpython-311.pyc b/Dashboard/migrations/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..ddf68b83e Binary files /dev/null and b/Dashboard/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/Dashboard/migrations/__pycache__/__init__.cpython-312.pyc b/Dashboard/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..ed7db3a63 Binary files /dev/null and b/Dashboard/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/Dashboard/migrations/__pycache__/__init__.cpython-313.pyc b/Dashboard/migrations/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..ae1490806 Binary files /dev/null and b/Dashboard/migrations/__pycache__/__init__.cpython-313.pyc differ diff --git a/Dashboard/migrations/__pycache__/__init__.cpython-39.pyc b/Dashboard/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..5646b4770 Binary files /dev/null and b/Dashboard/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/Dashboard/models.py b/Dashboard/models.py new file mode 100644 index 000000000..3329c3a85 --- /dev/null +++ b/Dashboard/models.py @@ -0,0 +1,39 @@ +from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin +from django.db import models + +# Custom User Manager +class CustomUserManager(BaseUserManager): + def create_user(self, email, name, age, password=None): + if not email: + raise ValueError("Email is required") + email = self.normalize_email(email) + user = self.model(email=email, name=name, age=age) + user.set_password(password) + user.save(using=self._db) + return user + + def create_superuser(self, email, name, age, password): + user = self.create_user(email, name, age, password) + user.is_staff = True + user.is_superuser = True + user.save(using=self._db) + return user + +# Custom User Model +class CustomUser(AbstractBaseUser, PermissionsMixin): + email = models.EmailField(unique=True) + name = models.CharField(max_length=100) + age = models.IntegerField() + is_active = models.BooleanField(default=True) + is_staff = models.BooleanField(default=False) + + objects = CustomUserManager() + + USERNAME_FIELD = "email" + REQUIRED_FIELDS = ["name", "age"] + + def __str__(self): + return self.email + + + diff --git a/Dashboard/templates/Alphabets.html b/Dashboard/templates/Alphabets.html new file mode 100644 index 000000000..b788e61d0 --- /dev/null +++ b/Dashboard/templates/Alphabets.html @@ -0,0 +1,310 @@ +{% load static %} + + + + + + Alphabet Learning + + + + + + + + + + + +

Learn Alphabets in Sign Language

+ + +
+ +
+

A

+ Sign A +

Make a fist with your thumb pointing up to form an “A.” Hold your hand in front of you with your palm facing forward. Close your fingers in a fist, but keep your thumb pressed against the side of your hand and pointing upwards. This is the letter “A.”

+
+ + +
+

B

+ Sign B +

Hold your fingers together with your thumb across your palm for “B.” Extend your fingers so they are straight. Bring them in close to each other so they are touching on the sides. Then, fold your thumb across the front of your palm and hold it there. This is the letter “B.”

+
+ + +
+

C

+ Sign C +

Curl your whole hand into the shape of a "C". Turn your right hand so that your palm is facing towards the left. Then, curl your fingers and thumb to form a half circle or backward “C.” Hold your hand still. This is the letter “C.”

+
+ + +
+

D

+ Sign D +

Touch your fingertips to your thumb and point to make a “D”. Touch the tip of your thumb to every finger except your index finger. Then, point your index finger straight up. Hold your hand still with your palm facing forward. This is the letter “D.”

+
+ + +
+

E

+ Sign E +

Form the letter “B” and curl your fingertips down to make an “E.” Bend all four fingers down to meet your thumb. Press the tips of your fingers against the side of your thumb. This is the letter “E.” + + Keep your thumb and fingertips close to your palm. Otherwise, it might look like an “O" or "C." + +

+
+ + +
+

F

+ Sign E +

Press your index finger and thumb together with straight fingers for “F.” Keep your other 3 fingers straight. This is the letter “F.”

+
+ +
+

G

+ Sign E +

Point your index finger and turn your hand to the side to make a “G.” Gather your fingers in towards your palm to make a fist. Then, extend your index finger and rest your thumb against your middle finger. Keep your thumb about 0.5 in (1.3 cm) from your palm so that it is parallel to your index finger. Angle your hand so that your palm is facing you and your index finger is pointing to your left. This is the letter “G.”

+
+ + +
+

H

+ Sign E +

Stick out your middle and index fingers to form an “H.” Keep your hand in the same position as it was for the letter “G,” but extend your middle finger as well. Hold your middle finger so it’s right next to your index finger. Angle your hand so that your palm is facing you and your index and middle fingers are pointing to your left. This is the letter “H.”

+
+ + +
+

I

+ Sign E +

Point your pinkie straight up to make an “I.” Form a fist and poke your pinkie finger straight up. This is the letter “I.”

+
+ + +
+

J

+ Sign E +

Use your pinkie to draw the shape of a "J". With your hand still in the position for the letter “I,” bring your finger down and then swoop it upwards in the shape of a letter “J.” Do this multiple times if you want to create multiple Js, or just once for one letter J. + + Keep your palm facing away from you as you do this. + +

+
+ + +
+

K

+ Sign E +

Point the index and middle fingers with a thumb between them for “K.” Press your ring finger and pinkie finger against your palm. Hold your index and middle finger so they are straight up but spread apart in the shape of a V. Then, press your thumb against your palm so that the tip of your thumb is between your index and middle finger near where they meet your hand. This is a “K.”

+
+ + +
+

L

+ Sign E +

Form an L-shape with your thumb and index finger to make an “L.” Press your middle, ring, and pinkie fingers against your palm as you form an L-shape with your index finger and thumb. This is the letter “L.”

+
+ + +
+

M

+ Sign E +

Hold an invisible ball and poke your thumb through for "M." Curl your fingers down towards your palm with your thumb between your index and middle finger. Hold your fingers like you’re wrapping them around a ball. Then, poke your thumb between your ring and pinky finger. This is how you make an “M.” [10] + + Tip: On letters "M", "N", and "T", make the fingers on top of the thumb obviously higher than the others to make for easy interpreting.

+
+ + +
+

N

+ Sign E +

Poke your thumb between your middle and ring finger for “N.” Curl your fingers as if they’re holding a ball. Then, push the tip of your thumb between your middle and ring fingers. This is an “N.”

+
+ + +
+

O

+ Sign E +

Make an "O" with your fingers and thumb. Press the tips of your fingers and thumb together. This is the letter “O.”[12] + + Some people may turn their hand slightly to show the "O" formed by the fingers to differentiate it from "E". + +

+
+ + +
+

P

+ Sign E +

Press your thumb against your middle finger with index pointed for “P.” Press your ring finger and pinkie finger against your palm. Then, extend your index finger as if you're pointing at something. Extend your middle finger so it's pointing down and touch it with your thumb. This is the letter “P.”

+
+ + +
+

Q

+ Sign E +

Make the sign for a “G” and then point down for a “Q.” Press your middle, ring, and pinkie fingers against your palm and point with your index finger. Then, rest your thumb on top of your middle finger so that it is about 0.5 in (1.3 cm) from your index finger. Then, point down with your hand in this position. This is the letter “Q.”

+
+ + +
+

R

+ Sign E +

Cross your index finger over your middle finger for an “R.” Press your ring finger, pinkie, and thumb against your palm. Then, wrap your middle finger around the back of your index finger. Hold your hand still with your palm facing forward. This is the letter “R.”[

+
+ + +
+

S

+ Sign E +

Make a fist and put your thumb on top of your fingers for an “S.” This is often confused with "A" so pay careful attention to the thumb position. Press your fingers against your palm and wrap your thumb over them. This is the letter “S.”

+
+ + +
+

T

+ Sign E +

Form a fist with your thumb between the middle and index finger for “T.” Press your fingers against your palm. Then, push your thumb up between your index and middle finger. This is the letter “T.”

+
+ +
+

U

+ Sign E +

Point your middle and index fingers upwards together to make “U.” Press your thumb, ring finger, and pinkie finger against your palm. Then, point your middle and index finger straight up and hold them against each other. This is the letter “U.”

+
+ +
+

V

+ Sign E +

Make a "U" and separate your fingers for a “V.” With your hand in the “U” position, spread your fingers apart. This is the letter “V.” Make sure to keep your ring finger, pinkie, and thumb pressed against your palm.[

+
+ +
+

W

+ Sign E +

Hold up 3 fingers and spread them apart to form “W.” Press your pinkie finger to your palm using your thumb. Then, hold up your index, middle, and ring fingers and spread them apart so that they look like the letter “W.” This is a “W.”

+
+ +
+

X

+ Sign E +

Make a fist, then raise and crook your index finger to make “X.” Press your thumb against your palm and then wrap your middle, ring, and pinkie fingers over it. Curl your index finger. This is the letter “X.”

+
+ +
+

Y

+ Sign E +

Stick out your pinkie and thumb for a “Y.” Press your other fingers against your palm. This is the letter “Y.”

+
+ +
+

Z

+ Sign E +

Write the letter “Z” in the air with your index finger. Form the letter "D", with your index finger out, and write a letter “Z” in the air.

+
+ +
+ + + diff --git a/Dashboard/templates/advanced_grammar.html b/Dashboard/templates/advanced_grammar.html new file mode 100644 index 000000000..e6aab7215 --- /dev/null +++ b/Dashboard/templates/advanced_grammar.html @@ -0,0 +1,68 @@ +{% load static %} + + + + + + + + ASL Grammar Guide + + + +
+

ASL Grammar Guide

+

Understanding American Sign Language Grammar

+
+ +
+

Introduction

+

One common misconception about American Sign Language (ASL) is that it is essentially signed English. However, like any other language, ASL has its own system of grammar that is integral to effective communication and understanding.

+ ASL Introduction +
+ +
+

Sentence Structure

+

ASL commonly uses a type of sentence structure called topicalization...

+ Sentence Structure +
+ +
+

Non-Manual Markers

+

In ASL, a non-manual marker (NMM) is an action that gives context or meaning to what is being signed...

+ Non-Manual Markers +
+ +
+

Signing Space

+

The signing space is an important aspect of ASL that determines where and how signs are placed...

+ Signing Space +
+ +
+

Sign Movement

+

Sign movement plays a crucial role in conveying meaning in ASL...

+ Sign Movement +
+ +
+

Handshape

+

The shape of the hand while signing determines different meanings...

+ Handshape +
+ +
+

Additional ASL Resources

+

If you are looking for more ASL resources, check out the following:

+ + ASL Resources +
+ + + + diff --git a/Dashboard/templates/basic_questions.html b/Dashboard/templates/basic_questions.html new file mode 100644 index 000000000..5dd62a0b0 --- /dev/null +++ b/Dashboard/templates/basic_questions.html @@ -0,0 +1,26 @@ +{% load static %} + + + + + + Basic Questions + + + +
+

Basic Questions

+
+ {% for question, description in questions.items %} +
+ {{ question }} +

{{ question }}?

+

{{ description }}

+
+ {% endfor %} +
+
+ + diff --git a/Dashboard/templates/common_greetings.html b/Dashboard/templates/common_greetings.html new file mode 100644 index 000000000..4ce9ac1d3 --- /dev/null +++ b/Dashboard/templates/common_greetings.html @@ -0,0 +1,56 @@ +{% load static %} + + + + + + Common Greetings + + + + + +
+ Common Greetings in ASL +
+ + +
+ Common Greetings in ASL +
+ + +
+
+ + +
+

Hello

+

ASL Sign: Extend your dominant hand and move it in a small wave.

+ Hello in ASL +
+ +
+

Thank You

+

ASL Sign: Touch your fingers to your chin and move your hand forward.

+ Thank You in ASL +
+ +
+

Good Morning

+

ASL Sign: Move your dominant hand upward like the sun rising.

+ Good Morning in ASL +
+ +
+

Goodbye

+

ASL Sign: Wave your hand as you would normally say goodbye.

+ Goodbye in ASL +
+ +
+
+ + + diff --git a/Dashboard/templates/dashboard.html b/Dashboard/templates/dashboard.html new file mode 100644 index 000000000..370955535 --- /dev/null +++ b/Dashboard/templates/dashboard.html @@ -0,0 +1,391 @@ + +{% load static %} + + + + + + Dashboard + + + + + + + + + + {% comment %}
+ Logo +
SignMaster
+
Bridging Silence, Empowering Learning
+ +
{% endcomment %} + + +
+

Select your learning level to begin your journey.

+
+ + + +
+ +
+ + + +
+ + +
+

Beginner Level

+

"Basic Communication & Daily Life"

+ +
+ +
+

Intermediate Level

+

"Expressive ASL & Social Conversations"

+ +
+ +
+

Advanced Level

+

"Storytelling & Conversation Fluency"

+ +
+
+ + +
+

Fun & Learn Zone!

+
+ +
+

ASL Converter

+ + +
+ + + + + + + + \ No newline at end of file diff --git a/Dashboard/templates/expressing_feelings.html b/Dashboard/templates/expressing_feelings.html new file mode 100644 index 000000000..a9ccf35c9 --- /dev/null +++ b/Dashboard/templates/expressing_feelings.html @@ -0,0 +1,59 @@ +{% load static %} + + + + + + + ASL Feelings + + + +
+

Learn Feelings in ASL

+ +
+
+ + Feeling 1 +
+ +
+ + Feeling 2 +
+ +
+ + Feeling 3 +
+ +
+ + Feeling 4 +
+ +
+ + Feeling 5 +
+ +
+ Feeling 6 +
+ +
+ + Feeling 7 +
+
+
+ + diff --git a/Dashboard/templates/login.html b/Dashboard/templates/login.html new file mode 100644 index 000000000..81d594d36 --- /dev/null +++ b/Dashboard/templates/login.html @@ -0,0 +1,115 @@ + + + + + + Login + + + + + +
+

Login to Your Account

+
+ {% csrf_token %} + {{ form.non_field_errors }} + {% for field in form %} + + {{ field }} + {{ field.errors }} + {% endfor %} + +
+

Don't have an account? Sign Up

+
+ + + diff --git a/Dashboard/templates/numbers.html b/Dashboard/templates/numbers.html new file mode 100644 index 000000000..6d3f43a56 --- /dev/null +++ b/Dashboard/templates/numbers.html @@ -0,0 +1,311 @@ +{% load static %} + + + + + + Alphabet Learning + + + + + + + + + + + +

Learn Numbers in Sign Language

+ + +
+ +
+

0

+ Sign A +

Number 0 + Sign “zero” by curving all your fingers and touching them to your thumb. Create an “O” shape with your hand with an open circle in the middle to represent the center of the number “0.”

+
+ +
+

1 to 5

+ Sign A +

Numbers 1-5 + Signing numbers 1-5 is similar to how you would naturally count on your fingers. For most situations, face your palm toward you with the back of your hand facing outward.[2] However, if you’re signing a multiple-digit number or series of numbers, like a phone number, face your palm outwards.[3] + + 1: Point upward with your index finger, keep the rest of your fingers in a fist or ASL “S”-shape. + 2: Point upward with your index and middle fingers. + 3: Same as signing the number 2, but with your thumb extended. + 4: Hold up all fingers except your thumb. + 5: Hold up all five fingers

+
+ +
+

6 to 9

+ Sign A +

+ Numbers 6-9 + The numbers 6-9 are counted by touching a different finger to your thumb for each digit. Face your palm outwards, towards the person to whom you are signing. The order is pinkie to thumb (6), then ring finger (7), middle finger (8), index (9). If you forget which way this goes, it might be helpful to remember that for the smallest number (6) you touch your thumb to the smallest finger (pinkie).[4] + + 6: From a 5 handshape, touch your pinky to your thumb. + 7: From a 5 handshape, touch your ring finger to your thumb. + 8: From a 5 handshape, touch your middle finger to your thumb. + 9: From a 5 handshape, touch your index finger to your thumb. + +

+
+ +
+

10

+ Sign A +

Number 10 + Sign the number 10 by shaking an “A” or “thumbs up” handshape. Make a fist and extend your thumb out. Lightly shake your hand from side to side

+
+ +
+

11 to 15

+ Sign A +

+ Numbers 11-15 + Face your palm towards you to sign numbers 11-15. Numbers 11-12 require you to “flick” your fingers upward and outward from your palm. For numbers 13-15, bend your fingers toward you in more of a “come here” gesture.[6] + + 11: From a loose fist, flick your index finger twice against your thumb. + 12: From a loose fist, flick your index and middle fingers twice against your thumb. + 13: Extend your thumb, index, and middle fingers. Bend your index and middle fingers twice toward you. + 14: Extend all fingers but your thumb. Fold your extended fingers toward you twice. + 15: Extend all fingers including your thumb. Fold your index, middle, ring, and pinky fingers toward you twice. + +

+
+ +
+

11-19

+ Sign A +

+ Numbers 16-19 + For each number, your hand takes the shape of the base number, e.g. “6” for “16” and “8” for “18.” Start with your palm facing inward and twist your wrist as if you were going to turn the sign to face outward. Instead, stop about halfway through the turn, twist your hand back toward you, and repeat.[7] + + 16: Touch your pinky to your thumb. Face your palm toward you then twist it outward twice. + 17: Touch your ring finger to your thumb. Face your palm toward you then twist it outward twice. + 18: Touch your middle finger to your thumb. Face your palm toward you then twist it outward twice. + 19: Touch your index finger to your thumb. Face your palm toward you then twist it outward twice. + +

+
+ +
+

20

+ Sign A +

Number 20 + To sign the number 20, face your palm forward and tap your thumb and index finger together twice. Curl all other fingers into your palm. This gesture is similar to how you would pinch something, or if you were making the “G” sign but opening and closing your fingers.

+
+ +
+

21

+ Sign A +

Number 21 + The sign for 21 almost looks like a “gun” gesture. Start from an “L” handshape with your palm facing outward. Extend your index and thumb finger and keep the rest of your fingers clenched. Bend your thumb twice toward your index finger.

+
+ +
+

22

+ Sign A +

+ Number 22 + Make a “2” with your fingers. Move your palm downward once, as if “tapping” the air with your “2” handshape. Repeat this motion a few inches away from the original sign.[10] + + If you sign right-handed, move your second “2” toward the right. If you sign left-handed, move it toward the left. + +

+
+ +
+

23

+ Sign A +

+ Number 23 + Orient your palm outward. Extend your thumb, index, and middle fingers to create a “3” handshape. Flick your middle finger down twice to complete the sign.[11] + + The signs for numbers 23-29 are all compound signs where the “L” shape represents the number 2. + +

+
+ +
+

24

+ Sign A +

Number 24 + Start with your palm facing forward. Make an “L” or “gun” handshape with your thumb and index finger extended and your index finger pointing upward. Move your hand slightly sideways, away from your body, and sign the number “4” by extending every finger except your thumb.

+
+ +
+

25

+ Sign A +

+ Number 25 + Face your palm away from you. Make a “5” handshape by extending all of your fingers, including your thumb. Bend your middle finger down twice to sign 25. +

+
+ + +
+

26

+ Sign A +

Number 26 + Face your palm outward. Make an “L” handshape with your thumb and index finger, then move your hand slightly sideways, away from your body. Switch to a “6” handshape. To sign a 6, touch your pinky to your thumb and extend all other fingers.[14] X

+
+ +
+

27

+ Sign A +

Number 27 + Orient your palm forward and sign the letter “L” by extending your thumb and index finger. Move your hand slightly sideways, away from your body, and sign the number “7” by touching your ring finger to your thumb and extending all other fingers upward.[15] X

+
+ +
+

28

+ Sign A +

Number 28 + With your palm facing forward, sign the letter “L.” Extend your index finger and thumb and make sure your index finger is pointing upward. Move your hand slightly sideways, away from your body. Sign the number “8” by extending all fingers and then touching your middle finger to your thumb

+
+ +
+

29

+ Sign A +

Number 29 + Face your palm outward. Extend your thumb and index finger to make the “L” handshape. Then, move your hand slightly sideways, away from your body, and sign the number “9” by touching your index finger to your thumb with all other fingers extended.[

+
+ +
+

Multipule of 10(30 - 100)

+ Sign A +

+ Multiples of 10 + The numbers that are evenly divisible by 10 include 30, 40, 50, 60, 70, 80, and 90. Each of these numbers are expressed by signing the first digit followed by the sign for zero.[18] + + All of these number signs are signed with the palm facing outward, even if their digits would be signed palm-inward on their own. + 30: Face your palm outward and sign a “3” handshape by extending your thumb, index, and middle fingers. Then, curl all your fingers to touch your thumb in the “zero” handshape. + 40: Face your palm outward and sign a “4” handshape by extending your index, middle, ring, and pinky fingers. Then, curl all your fingers to touch your thumb in the “zero” handshape. + 50: Face your palm outward and sign a “5” handshape by extending all your fingers. Then, curl all your fingers to touch your thumb in the “zero” handshape. + 60: Face your palm outward and sign a “6” handshape by touching your pinky to your thumb with all other fingers extended. Then, curl all your fingers to touch your thumb in the “zero” handshape. + +

+
+ +
+

31 to 99

+ Sign A +

Numbers 31-99 + Once you learn digits 1-10 in ASL, signing numbers 31-99 are fairly simple. With your palm facing outward, sign each number by signing the first and second digits in quick succession.[19] + + For example, 32 is signed as 3-2, 41 is signed as 4-1, etc

+
+ +
+

100

+ Sign A +

Number 100 + Make a “1” shape with your hand then quickly move into a “C” handshape. To help remember this sign, think about how “C” equals 100 in Roman numerals.

+
+ + +
+ + + diff --git a/Dashboard/templates/password_reset.html b/Dashboard/templates/password_reset.html new file mode 100644 index 000000000..25b30d455 --- /dev/null +++ b/Dashboard/templates/password_reset.html @@ -0,0 +1,5 @@ +
+ {% csrf_token %} + {{ form.as_p }} + +
diff --git a/Dashboard/templates/password_reset_email.html b/Dashboard/templates/password_reset_email.html new file mode 100644 index 000000000..45e12ecde --- /dev/null +++ b/Dashboard/templates/password_reset_email.html @@ -0,0 +1,2 @@ +Click the link below to reset your password: +Reset Password diff --git a/Dashboard/templates/sentence_structure.html b/Dashboard/templates/sentence_structure.html new file mode 100644 index 000000000..88aa4d9c9 --- /dev/null +++ b/Dashboard/templates/sentence_structure.html @@ -0,0 +1,73 @@ + + + + + + ASL Sentence Structure + + + +
+

Explaining the Basic ASL Sentence Structure

+

Learning signs is not enough if you want to master ASL. You also have to learn how ASL sentence structure works.

+
+ +
+

Understanding ASL Grammar

+

American Sign Language does not directly follow English sentence structures. ASL primarily follows a topic-comment structure, where a sentence starts with the topic and ends with a comment.

+

However, ASL can also use a subject-verb-object structure, which is similar to English.

+
+ +
+

The Topic-Comment Structure

+

In this structure, the topic of the sentence is presented first, followed by a comment about it.

+ +
+ +
+

The Subject-Verb-Object Structure

+

This structure is used in specific cases, such as simple sentences or commands:

+ +
+ +
+

Time and Context in ASL

+

ASL uses time markers instead of verb conjugations, such as "yesterday," "tomorrow," or "this morning." These markers establish the time frame for the sentence.

+
+ +
+

Non-Manual Markers

+

ASL grammar also relies on non-manual markers, including:

+ +
+ +
+

How to Learn ASL Grammar

+

To master ASL, focus on:

+ +
+ + +
+ + diff --git a/Dashboard/templates/signup.html b/Dashboard/templates/signup.html new file mode 100644 index 000000000..cd2b4e519 --- /dev/null +++ b/Dashboard/templates/signup.html @@ -0,0 +1,115 @@ + + + + + + Sign Up + + + + +
+ +

Create Your Account

+
+ {% csrf_token %} + {{ form.non_field_errors }} + {% for field in form %} + + {{ field }} + {{ field.errors }} + {% endfor %} + +
+

Already have an account? Login

+
+ + + diff --git a/Dashboard/templates/vocabulary.html b/Dashboard/templates/vocabulary.html new file mode 100644 index 000000000..c56475bff --- /dev/null +++ b/Dashboard/templates/vocabulary.html @@ -0,0 +1,23 @@ +{% load static %} + + + + + + Basic Vocabulary + + + +
+

Basic Vocabulary Tutorials

+ + {% for i in "123456789" %} +
+

Tutorial {{ i }}

+

Complete this stage to move to the next level. This is stage {{ i }}.

+ Tutorial {{ i }} +
+ {% endfor %} +
+ + diff --git a/Dashboard/tests.py b/Dashboard/tests.py new file mode 100644 index 000000000..7ce503c2d --- /dev/null +++ b/Dashboard/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/Dashboard/urls.py b/Dashboard/urls.py new file mode 100644 index 000000000..5f076aea6 --- /dev/null +++ b/Dashboard/urls.py @@ -0,0 +1,46 @@ +from django.urls import path +from django.shortcuts import redirect +from django.contrib.auth import views as auth_views +from .views import signup_view, login_view, logout_view +from django.conf import settings +from django.conf.urls.static import static +from . import views +from gamification.views import quiz,word_match_game,flashcard_game,sign_typing_game +from .views import basic_questions +from .views import vocabulary_page +from django.urls import include +from asl_sign.views import text_to_sign,input_page +from speech_to_text.views import speech_to_text_home + +def redirect_to_login(request): + return redirect('login') + +urlpatterns = [ + path('', redirect_to_login, name='home'), + path("signup/", signup_view, name="signup"), + path("login/", login_view, name="login"), + path("logout/", logout_view, name="logout"), + path('dashboard/', views.dashboard, name='dashboard'), + path('alphabets/', views.alphabets, name='alphabets'), + path('numbers/', views.numbers, name='numbers'), + path('common_greetings/', views.common_greetings, name='common_greetings'), + path('basic_questions/', views.basic_questions, name='basic_questions'), + path('basic-questions/', basic_questions, name='basic_questions'), + path('vocabulary/', vocabulary_page, name='vocabulary'), + path('sentence_structure/', views.sentence_structure, name='sentence_structure'), + path('expressing_feelings/', views.expressing_feelings, name='expressing_feelings'), + path('advanced_grammar/', views.advanced_grammar, name='advanced_grammar'), + path('signing_speed/', views.signing_speed, name='signing_speed'), + path('storytelling/', views.storytelling, name='storytelling'), + path("quiz/", quiz, name="quiz"), + path("word-match/", word_match_game, name="word-match"), + path("flashcards/",flashcard_game,name="flashcards"), + path("sign-typing-game/",sign_typing_game,name="sign-typing-game"), + path('input/', input_page, name='input_text'), + path('text-to-sign/', text_to_sign, name='text_to_sign'), + path('speech/', include('speech_to_text.urls')), + # path('ab/', speech_to_text_home, name='speech-home'), +] + +if settings.DEBUG: + urlpatterns += static(settings.STATIC_URL, document_root=settings.STATICFILES_DIRS[0]) \ No newline at end of file diff --git a/Dashboard/views.py b/Dashboard/views.py new file mode 100644 index 000000000..26ad3ed00 --- /dev/null +++ b/Dashboard/views.py @@ -0,0 +1,109 @@ +from django.shortcuts import render, redirect +from django.contrib.auth import authenticate, login, logout +from django.contrib.auth.views import PasswordResetView, PasswordResetConfirmView +from django.urls import reverse_lazy +from .forms import SignupForm, LoginForm +from .models import CustomUser + +def dashboard(request): + return render(request, "dashboard.html", { + "quiz_url": "/gamification/quiz/", + "word_match_url": "/gamification/word-match/", + "flashcards_url": "/gamification/flashcards/", + "typingGame_url": "/gamification/sign-typing-game/", + "input_url": reverse_lazy('input_text'), + "text_to_sign_url": reverse_lazy('text_to_sign'), + "speech_to_text_url": "/speech/ab/", + "logout_url": reverse_lazy('logout'), + }) + +# Signup View +def signup_view(request): + if request.method == "POST": + form = SignupForm(request.POST) + if form.is_valid(): + form.save() + return redirect("dashboard") + else: + form = SignupForm() + return render(request, "signup.html", {"form": form}) + +# Login View +def login_view(request): + if request.method == "POST": + form = LoginForm(request, data=request.POST) + if form.is_valid(): + email = form.cleaned_data["username"] + password = form.cleaned_data["password"] + user = authenticate(request, email=email, password=password) + if user is not None: + login(request, user) + return redirect("dashboard") + else: + form = LoginForm() + return render(request, "login.html", {"form": form}) + +# Logout View +def logout_view(request): + logout(request) + return redirect("login") + +# Password Reset View (uses Django’s built-in view) +class CustomPasswordResetView(PasswordResetView): + template_name = "password_reset.html" + email_template_name = "password_reset_email.html" + success_url = reverse_lazy("password_reset_done") + +# Password Reset Confirm View +class CustomPasswordResetConfirmView(PasswordResetConfirmView): + template_name = "password_reset_confirm.html" + success_url = reverse_lazy("password_reset_complete") + +from django.shortcuts import render + + + +def numbers(request): + return render(request, 'numbers.html') + +def common_greetings(request): + return render(request, 'common_greetings.html') + +def basic_questions(request): + return render(request, 'basic_questions.html') + +def everyday_vocabulary(request): + return render(request, 'vocabulary.html') + +def sentence_structure(request): + return render(request, 'sentence_structure.html') + +def expressing_feelings(request): + return render(request, 'expressing_feelings.html') + +def advanced_grammar(request): + return render(request, 'advanced_grammar.html') + +def signing_speed(request): + return render(request, 'course/signing_speed.html') + +def storytelling(request): + return render(request, 'course/storytelling.html') + +def alphabets(request): + return render(request, 'Alphabets.html') + +def basic_questions(request): + questions = { + "Who": "With your dominant hand, place your thumb on your chin and let your index finger wiggle from the joint.", + "What": "Put your hands outward in front of you, with elbows bent and palms up. Shake your hands back and forth towards each other.", + "Where": "Hold up the index finger of your dominant hand, like you're indicating 'one,' then shake it side to side.", + "When": "Put both of your index fingers together at a 90-degree angle at the tips. Your dominant index finger then makes a full circle around the passive index finger and returns to the starting position.", + "Which": "Make both hands into fists with your thumbs pointing up; alternate each fist in an up-and-down movement.", + "Why": "Touch the side of your forehead with the fingers of your dominant hand, extend your thumb and pinky (in the Y sign) while you bring your hand down.", + "How": "With fingers pointing downward and backs of fingers and knuckles touching, roll hands inward to your chest and up so that the pinky sides of your hands are touching." + } + return render(request, "basic_questions.html", {"questions": questions}) + +def vocabulary_page(request): + return render(request, "vocabulary.html") \ No newline at end of file diff --git a/README.md b/README.md index dd7fb1bbe..797c0880b 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,213 @@ -# Hack the Future | Horizon 2025, IIITV-ICD +**Team Name - Upay** -Welcome to **Hack the Future**, the 36-hour online hackathon organized by Coding Club DCodr as part of **Horizon 2025**, the annual technical fest of **IIITV-ICD**. This is your chance to collaborate, innovate, and build creative solutions to real-world problems. +**Team Members: Aishna Bhatia, Aesha Ladani, Priyanka Lotiya, Urvashi Ladva, Yashvi Khatri** -**Once the hackathon begins, please follow the instructions below carefully.** +# **Sign Language Learning Platform** 🌟 + +## **Overview** +This project is an **interactive learning platform** designed to help individuals, especially the **deaf and mute community**, learn **American Sign Language (ASL)** in an engaging and structured way. + +It includes **three learning levels**, interactive **quizzes, games, AI-powered tools, and a progress tracker** to ensure an immersive and enjoyable learning experience. + +--- + +## **Key Features** + +### 🏆 **1) Structured Learning with Three Levels** +The learning content is divided into **three progressive levels** to help users master ASL step by step. + +#### 📚 **Beginner Level – "Basic Communication & Daily Life"** +At this level, users will learn **essential ASL skills** for daily communication. +**Courses:** +👉 ASL Alphabet +👉 Numbers +👉 Common Greetings +👉 Basic Questions + +#### 💛 **Intermediate Level – "Expressive ASL & Social Conversations"** +Users improve fluency and learn to **form meaningful expressions**. +**Courses:** +👉 Everyday Vocabulary +👉 Basic Sentence Structure +👉 Expressing Yes/No & Feelings + +#### 📝 **Advanced Level – "Storytelling & Conversation Fluency"** +This level focuses on **ASL storytelling, grammar, and conversation fluency**. +**Courses:** +👉 Advanced Grammar + +💡 **How Learning Works?** +- Each course has **videos, images, and interactive content** to make learning fun. +- Users can track their progress and complete courses at their own pace. --- -## **Instructions for Participants** +### 🎯 **2) Quizzes for All Three Levels** +After learning, users can test their knowledge with **interactive quizzes**. +- **Separate quizzes** for each level (**Beginner, Intermediate, Advanced**). +- **Timer-based questions** to make it more engaging. +- Users receive **instant feedback** on their answers. + +--- + +### 🏅 **3) Leaderboard – Compare Your Scores** +Users can **track their quiz & Games performance** and compete with others. +- See your **ranking** compared to other learners. +- Earn **badges and achievements** based on performance. +- **Motivates users** to improve their ASL skills. + +--- + +### 🎮 **4) Match the Word Game – Learn ASL Playfully** +An **interactive game** where users **match words with the correct ASL signs**. +- Helps in **visual recognition** of ASL signs. +- Increases **memory retention** through active engagement. + +--- + +### 🃏 **5) Flashcard Game – Improve Sign Memory** +Users can **flip and find matching ASL sign flashcards**. +- Makes learning **more fun and engaging**. +- Improves **sign recognition and recall speed**. + +--- + +### ⌨️ **6) Type the Sign Game – Speed-Based Challenge** +A **fast-paced game** where users **type the word corresponding to an ASL sign shown in an image**. +- Users **score more points** for answering quickly. +- Helps in **quick recognition of ASL signs**. +- Builds **muscle memory** for sign language users. + +--- + +### 🎧 **7) Speech to ASL Sign Converter** +Users can **speak a word or sentence**, and the system will **convert it into ASL signs**. +- Uses **speech recognition and sign-matching technology**. +- **Helpful for non-ASL speakers** to communicate with ASL users. + +--- + +### 📝 **8) Text to ASL Sign Converter** +Users can **type a sentence**, and the system will **translate it into ASL signs**. +- Uses a **database of ASL sign images/gifs** for conversion. +- Allows **instant communication** in ASL. + +--- + +### 📸 **9) Sign to Text Converter (AI-Powered)** +Users can **capture an image of a sign** using their device camera. The system will **analyze the image and convert it into text**. +- Uses **Computer Vision & AI** to recognize ASL signs. +- Helps in **real-time ASL translation**. + +--- + +### 🤖 **10) AI Roadmap Planner** +An **AI-powered feature** that creates a **personalized learning plan** for users. +- Users **input their schedule, available time, and learning goals**. +- The system **recommends a study plan** based on course difficulty and user availability. +- Ensures **efficient and structured learning progress**. + +--- + + +## **💻 Technologies Used** + +### **Backend:** +- **Django (Python)** – Handles user authentication, progress tracking, and AI integration. +- **SQLite Database** – Stores user progress, quiz scores, and learning materials. -### ✅ **Step 1: Fork the Repository** -1. Once problem statements are available. Click the **Fork** button at the top right corner to create a copy of this repository in your GitHub account. -2. Clone the forked repository to your local machine using the command: +### **Frontend:** +- **HTML, CSS, JavaScript** – Creates an interactive and user-friendly UI. +### **Computer Vision & AI:** +- **OpenCV** – For ASL sign recognition from images/videos. +- **Speech Recognition API** – Converts spoken words into ASL signs. + ## LemmeBuild API builder for AIplanner +--- + +## 🚀 **How to Run the Project?** + +1️⃣ Clone the repository ```bash -git clone +git clone https://github.com/your-repo-url +cd Hack-the-Future ``` -### ✅ **Step 2: Select a Problem Statement** -- Review the provided problem statements in the PROBLEMS.md. -- Choose any one problem statement to work on. -- Work directly on the `main` branch to ensure your final work is on the main branch, as the organizers will evaluate your project every 6 hours. - -### ✅ **Step 3: Project Development** -- Develop your project locally. -- Commit your changes frequently with meaningful messages: +2️⃣ Create a virtual environment and activate it +```bash +python -m venv .venv +source .venv/Scripts/activate # Windows +source .venv/bin/activate # Mac/Linux +``` +3️⃣ Install dependencies ```bash -git add . -git commit -m "Initial commit with base project setup" +pip install -r requirements.txt ``` -- Push your changes to your forked repository: +4️⃣ Run migrations +```bash +python manage.py makemigrations +python manage.py migrate +``` +5️⃣ Start the Django server ```bash -git push origin main +python manage.py runserver ``` -### ✅ **Step 4: Submission** -1. Create a **Pull Request (PR)** to this repository before the hackathon ends. -2. Your repository should contain: - - `README.md`: Instructions to run your project. - - Source code and necessary files. - - Documentation (if any). -3. 4-5 Page PPT Presentation summarizing your solution to make it easier for judges to evaluate. - - Slide 1: Title, team name, and problem statement. - - Slide 2: Objective and solution overview. - - Slide 3: Key features and technologies used. - - Slide 4: solutions implemented. - - Slide 5: Challenges faced. - -⚠️ **Note:** Only PRs submitted before the hackathon deadline will be considered. Late submissions will not be accepted. +6️⃣ Open in browser +Go to http://127.0.0.1:8000/ and start learning ASL! 🎉 + + +## 📌 Future Enhancements + +🔹 More Games & Challenges – To make learning even more fun! +🔹 AI Sign Language Tutor – A chatbot that helps users learn ASL interactively. + + +![Course](https://github.com/user-attachments/assets/8ca46314-e0c0-4a1e-ab1c-87da64785080) + +![dasb](https://github.com/user-attachments/assets/5c36559c-f406-49f0-b7ca-e09e52cd087c) + +![al](https://github.com/user-attachments/assets/567d8f41-286a-4d0d-acce-9b76d39e3db9) + +![image](https://github.com/user-attachments/assets/7fb002c7-94de-460e-af1c-1793e449187e) + +![image](https://github.com/user-attachments/assets/f3636a7e-6250-4a1b-b82c-2bf11e52a61a) + +![image](https://github.com/user-attachments/assets/fd819b3f-f4ba-4723-a775-73356108d2f8) + +![image](https://github.com/user-attachments/assets/db0ab582-2c29-486c-9583-8bad55973ad6) + +![image](https://github.com/user-attachments/assets/acc68236-ed57-4a5f-b353-9c2e111a1d6f) + +![image](https://github.com/user-attachments/assets/b5a0f978-fb3a-4476-9bf1-89ae8e2a3468) + +![image](https://github.com/user-attachments/assets/885b9fd4-780b-4c87-927a-4312140bc953) + +![image](https://github.com/user-attachments/assets/790e545d-99e2-4717-ac3b-54676600e209) + +![image](https://github.com/user-attachments/assets/9566ea9a-5d09-46d8-881d-9301b1719532) + +![image](https://github.com/user-attachments/assets/45187504-4106-4322-9883-3d9e198f899e) + +![image](https://github.com/user-attachments/assets/e3650560-7d50-4acd-9ed1-7d9031b7d752) + +![image](https://github.com/user-attachments/assets/48abfd45-e51f-4ae0-ad95-26249c33e9ca) + +![image](https://github.com/user-attachments/assets/0bf443e1-951c-437b-b831-ea3108cd6255) + + + + + + + + ---- -## 🔍 **Evaluation Criteria** -- **Innovation & Creativity:** Uniqueness and originality of the solution. -- **Functionality & Implementation:** Proper execution and working functionality. -- **Code Quality:** Clean, readable, and maintainable code. -- **Presentation & Documentation:** Clear instructions and explanations. ---- -## ⏱️ **Hackathon Timeline** -- **Start:** [28/03/2025 5PM] -- **End:** [30/03/2025 5AM] -- **Duration:** 36 hours (continuous online mode) ---- -🚀 **Good luck and happy hacking!** 🎯 diff --git a/SignMaster/.gradio/certificate.pem b/SignMaster/.gradio/certificate.pem new file mode 100644 index 000000000..b85c8037f --- /dev/null +++ b/SignMaster/.gradio/certificate.pem @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw +TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh +cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4 +WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu +ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY +MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc +h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+ +0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U +A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW +T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH +B5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC +B5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf1b0SHzUv +KBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWn +OlFuhjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTn +jh8BCNAw1FtxNrQHusEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbw +qHyGO0aoSCqI3Haadr8faqU9GY/rOPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CI +rU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq +hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL +ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ +3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK +NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5 +ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur +TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC +jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc +oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq +4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA +mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d +emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc= +-----END CERTIFICATE----- diff --git a/SignMaster/__init__.py b/SignMaster/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/SignMaster/__pycache__/__init__.cpython-311.pyc b/SignMaster/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..c1e7ebf6a Binary files /dev/null and b/SignMaster/__pycache__/__init__.cpython-311.pyc differ diff --git a/SignMaster/__pycache__/__init__.cpython-312.pyc b/SignMaster/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..61d47996c Binary files /dev/null and b/SignMaster/__pycache__/__init__.cpython-312.pyc differ diff --git a/SignMaster/__pycache__/__init__.cpython-313.pyc b/SignMaster/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..64c5b9fe7 Binary files /dev/null and b/SignMaster/__pycache__/__init__.cpython-313.pyc differ diff --git a/SignMaster/__pycache__/__init__.cpython-39.pyc b/SignMaster/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..a853c4233 Binary files /dev/null and b/SignMaster/__pycache__/__init__.cpython-39.pyc differ diff --git a/SignMaster/__pycache__/settings.cpython-311.pyc b/SignMaster/__pycache__/settings.cpython-311.pyc new file mode 100644 index 000000000..151c75594 Binary files /dev/null and b/SignMaster/__pycache__/settings.cpython-311.pyc differ diff --git a/SignMaster/__pycache__/settings.cpython-312.pyc b/SignMaster/__pycache__/settings.cpython-312.pyc new file mode 100644 index 000000000..1c580465a Binary files /dev/null and b/SignMaster/__pycache__/settings.cpython-312.pyc differ diff --git a/SignMaster/__pycache__/settings.cpython-313.pyc b/SignMaster/__pycache__/settings.cpython-313.pyc new file mode 100644 index 000000000..0fe070b18 Binary files /dev/null and b/SignMaster/__pycache__/settings.cpython-313.pyc differ diff --git a/SignMaster/__pycache__/settings.cpython-39.pyc b/SignMaster/__pycache__/settings.cpython-39.pyc new file mode 100644 index 000000000..45ee2bab8 Binary files /dev/null and b/SignMaster/__pycache__/settings.cpython-39.pyc differ diff --git a/SignMaster/__pycache__/urls.cpython-311.pyc b/SignMaster/__pycache__/urls.cpython-311.pyc new file mode 100644 index 000000000..38f1fc14a Binary files /dev/null and b/SignMaster/__pycache__/urls.cpython-311.pyc differ diff --git a/SignMaster/__pycache__/urls.cpython-312.pyc b/SignMaster/__pycache__/urls.cpython-312.pyc new file mode 100644 index 000000000..887a1aeb2 Binary files /dev/null and b/SignMaster/__pycache__/urls.cpython-312.pyc differ diff --git a/SignMaster/__pycache__/urls.cpython-313.pyc b/SignMaster/__pycache__/urls.cpython-313.pyc new file mode 100644 index 000000000..3a046a9fa Binary files /dev/null and b/SignMaster/__pycache__/urls.cpython-313.pyc differ diff --git a/SignMaster/__pycache__/urls.cpython-39.pyc b/SignMaster/__pycache__/urls.cpython-39.pyc new file mode 100644 index 000000000..44c7d5d78 Binary files /dev/null and b/SignMaster/__pycache__/urls.cpython-39.pyc differ diff --git a/SignMaster/__pycache__/wsgi.cpython-311.pyc b/SignMaster/__pycache__/wsgi.cpython-311.pyc new file mode 100644 index 000000000..f2703cc23 Binary files /dev/null and b/SignMaster/__pycache__/wsgi.cpython-311.pyc differ diff --git a/SignMaster/__pycache__/wsgi.cpython-312.pyc b/SignMaster/__pycache__/wsgi.cpython-312.pyc new file mode 100644 index 000000000..78110f9f1 Binary files /dev/null and b/SignMaster/__pycache__/wsgi.cpython-312.pyc differ diff --git a/SignMaster/__pycache__/wsgi.cpython-313.pyc b/SignMaster/__pycache__/wsgi.cpython-313.pyc new file mode 100644 index 000000000..716a93840 Binary files /dev/null and b/SignMaster/__pycache__/wsgi.cpython-313.pyc differ diff --git a/SignMaster/__pycache__/wsgi.cpython-39.pyc b/SignMaster/__pycache__/wsgi.cpython-39.pyc new file mode 100644 index 000000000..39b3b6a27 Binary files /dev/null and b/SignMaster/__pycache__/wsgi.cpython-39.pyc differ diff --git a/SignMaster/asgi.py b/SignMaster/asgi.py new file mode 100644 index 000000000..7d841cbda --- /dev/null +++ b/SignMaster/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for SignMaster project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SignMaster.settings') + +application = get_asgi_application() diff --git a/SignMaster/recordSpeech.py b/SignMaster/recordSpeech.py new file mode 100644 index 000000000..14c5c4669 --- /dev/null +++ b/SignMaster/recordSpeech.py @@ -0,0 +1,23 @@ +# Speech To Text Converter +import speech_recognition as sr + +def record_and_transcribe(): + recognizer = sr.Recognizer() + + with sr.Microphone() as source: + print(" Say something... (Recording)") + recognizer.adjust_for_ambient_noise(source) # Reduce background noise + audio = recognizer.listen(source) # Capture audio + + try: + print("Converting speech to text...") + text = recognizer.recognize_google(audio) # Convert speech to text + print(f"Transcribed Text: {text}") + + except sr.UnknownValueError: + print("Could not understand the audio") + except sr.RequestError: + print("Error with the speech recognition service") + +if __name__ == "__main__": + record_and_transcribe() diff --git a/SignMaster/settings.py b/SignMaster/settings.py new file mode 100644 index 000000000..48e61e9be --- /dev/null +++ b/SignMaster/settings.py @@ -0,0 +1,158 @@ +""" +Django settings for SignMaster project. + +Generated by 'django-admin startproject' using Django 4.2.20. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/4.2/ref/settings/ +""" + +from pathlib import Path +import os + + + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +MEDIA_URL = '/media/' +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') + +STATIC_URL = '/static/' +STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-@ae4&bce+z=#w$^cs68s&4=+=#hu*%ez2rycsjc+%x4-3@mq+7' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + "AIPlanner", + 'Courses', + 'Dashboard', + "gamification", + 'corsheaders', + 'asl_sign', + 'speech_to_text', +] + +MIDDLEWARE = [ + 'corsheaders.middleware.CorsMiddleware', + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'SignMaster.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [BASE_DIR/"templates"], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'SignMaster.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/4.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/4.2/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/4.2/howto/static-files/ + +STATIC_URL = 'static/' + +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, 'static'), # This tells Django where to find static files +] + +STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') + +# Default primary key field type +# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' +AUTH_USER_MODEL = "Dashboard.CustomUser" +EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" + + +CORS_ALLOWED_ORIGINS = [ + "http://127.0.0.1:5501", # Your frontend (Live Server from VS Code) + # "http://localhost:5500", +] +# settings.py +CSRF_COOKIE_HTTPONLY = True +CSRF_COOKIE_SECURE = False # Set to True for production over HTTPS +CSRF_TRUSTED_ORIGINS = [] # Add trusted origins if needed diff --git a/SignMaster/sign-language-interpretor b/SignMaster/sign-language-interpretor new file mode 160000 index 000000000..ba534be56 --- /dev/null +++ b/SignMaster/sign-language-interpretor @@ -0,0 +1 @@ +Subproject commit ba534be56c172c80d594f91a0f2c7dd49b9929fb diff --git a/SignMaster/signToText.py b/SignMaster/signToText.py new file mode 100644 index 000000000..20838d5cd --- /dev/null +++ b/SignMaster/signToText.py @@ -0,0 +1,42 @@ +import gradio as gr +from transformers import AutoImageProcessor, AutoModelForImageClassification +from PIL import Image +import torch + +# Load model and processor +model_name = "Hemg/Indian-sign-language-classification" +processor = AutoImageProcessor.from_pretrained(model_name) +model = AutoModelForImageClassification.from_pretrained(model_name) + +# Define prediction function +def sign_language_classification(image): + """Predicts Indian sign language category for an input image.""" + try: + image = Image.fromarray(image).convert("RGB") # Convert image format + inputs = processor(images=image, return_tensors="pt") + + with torch.no_grad(): + outputs = model(**inputs) + logits = outputs.logits + probs = torch.nn.functional.softmax(logits, dim=1).squeeze().tolist() + + # Get model labels + labels = model.config.id2label # Hugging Face models store class labels here + predictions = {labels[i]: round(probs[i], 3) for i in range(len(probs))} + + return predictions + except Exception as e: + return {"Error": str(e)} + +# Create Gradio interface +iface = gr.Interface( + fn=sign_language_classification, + inputs=gr.Image(type="numpy"), + outputs=gr.Label(label="Prediction Scores"), + title="Indian Sign Language Detection", + description="Upload an image to classify it into one of the Indian sign language categories." +) + +# Launch the app +if __name__ == "__main__": + iface.launch(share=True) diff --git a/SignMaster/urls.py b/SignMaster/urls.py new file mode 100644 index 000000000..09a19ca38 --- /dev/null +++ b/SignMaster/urls.py @@ -0,0 +1,17 @@ +from django.conf import settings +from django.conf.urls.static import static +from django.contrib import admin +from django.urls import path, include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('',include("Dashboard.urls")), + path('gamification/',include("gamification.urls")), + path('plan/', include("AIPlanner.urls", namespace='AIPlanner')), + path('speech/', include('speech_to_text.urls')), +] + + +if settings.DEBUG: + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + urlpatterns += static(settings.STATIC_URL, document_root=settings.STATICFILES_DIRS[0]) diff --git a/SignMaster/wsgi.py b/SignMaster/wsgi.py new file mode 100644 index 000000000..8fb7ed6e3 --- /dev/null +++ b/SignMaster/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for SignMaster project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SignMaster.settings') + +application = get_wsgi_application() diff --git a/asl_sign/__init__.py b/asl_sign/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/asl_sign/__pycache__/__init__.cpython-311.pyc b/asl_sign/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..dca783b34 Binary files /dev/null and b/asl_sign/__pycache__/__init__.cpython-311.pyc differ diff --git a/asl_sign/__pycache__/__init__.cpython-312.pyc b/asl_sign/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..ad36c3ce8 Binary files /dev/null and b/asl_sign/__pycache__/__init__.cpython-312.pyc differ diff --git a/asl_sign/__pycache__/__init__.cpython-313.pyc b/asl_sign/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..79b8ee05a Binary files /dev/null and b/asl_sign/__pycache__/__init__.cpython-313.pyc differ diff --git a/asl_sign/__pycache__/__init__.cpython-39.pyc b/asl_sign/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..f1696d7ee Binary files /dev/null and b/asl_sign/__pycache__/__init__.cpython-39.pyc differ diff --git a/asl_sign/__pycache__/admin.cpython-311.pyc b/asl_sign/__pycache__/admin.cpython-311.pyc new file mode 100644 index 000000000..0821944b5 Binary files /dev/null and b/asl_sign/__pycache__/admin.cpython-311.pyc differ diff --git a/asl_sign/__pycache__/admin.cpython-312.pyc b/asl_sign/__pycache__/admin.cpython-312.pyc new file mode 100644 index 000000000..7a947d627 Binary files /dev/null and b/asl_sign/__pycache__/admin.cpython-312.pyc differ diff --git a/asl_sign/__pycache__/admin.cpython-313.pyc b/asl_sign/__pycache__/admin.cpython-313.pyc new file mode 100644 index 000000000..b54413637 Binary files /dev/null and b/asl_sign/__pycache__/admin.cpython-313.pyc differ diff --git a/asl_sign/__pycache__/admin.cpython-39.pyc b/asl_sign/__pycache__/admin.cpython-39.pyc new file mode 100644 index 000000000..f73e1b942 Binary files /dev/null and b/asl_sign/__pycache__/admin.cpython-39.pyc differ diff --git a/asl_sign/__pycache__/apps.cpython-311.pyc b/asl_sign/__pycache__/apps.cpython-311.pyc new file mode 100644 index 000000000..6d80d76c4 Binary files /dev/null and b/asl_sign/__pycache__/apps.cpython-311.pyc differ diff --git a/asl_sign/__pycache__/apps.cpython-312.pyc b/asl_sign/__pycache__/apps.cpython-312.pyc new file mode 100644 index 000000000..0ddb5b761 Binary files /dev/null and b/asl_sign/__pycache__/apps.cpython-312.pyc differ diff --git a/asl_sign/__pycache__/apps.cpython-313.pyc b/asl_sign/__pycache__/apps.cpython-313.pyc new file mode 100644 index 000000000..67cdbb9cd Binary files /dev/null and b/asl_sign/__pycache__/apps.cpython-313.pyc differ diff --git a/asl_sign/__pycache__/apps.cpython-39.pyc b/asl_sign/__pycache__/apps.cpython-39.pyc new file mode 100644 index 000000000..39b977f86 Binary files /dev/null and b/asl_sign/__pycache__/apps.cpython-39.pyc differ diff --git a/asl_sign/__pycache__/models.cpython-311.pyc b/asl_sign/__pycache__/models.cpython-311.pyc new file mode 100644 index 000000000..e79013ac1 Binary files /dev/null and b/asl_sign/__pycache__/models.cpython-311.pyc differ diff --git a/asl_sign/__pycache__/models.cpython-312.pyc b/asl_sign/__pycache__/models.cpython-312.pyc new file mode 100644 index 000000000..7a42a270d Binary files /dev/null and b/asl_sign/__pycache__/models.cpython-312.pyc differ diff --git a/asl_sign/__pycache__/models.cpython-313.pyc b/asl_sign/__pycache__/models.cpython-313.pyc new file mode 100644 index 000000000..6dd755d56 Binary files /dev/null and b/asl_sign/__pycache__/models.cpython-313.pyc differ diff --git a/asl_sign/__pycache__/models.cpython-39.pyc b/asl_sign/__pycache__/models.cpython-39.pyc new file mode 100644 index 000000000..0ff393eb2 Binary files /dev/null and b/asl_sign/__pycache__/models.cpython-39.pyc differ diff --git a/asl_sign/__pycache__/urls.cpython-311.pyc b/asl_sign/__pycache__/urls.cpython-311.pyc new file mode 100644 index 000000000..cbed4b4cb Binary files /dev/null and b/asl_sign/__pycache__/urls.cpython-311.pyc differ diff --git a/asl_sign/__pycache__/urls.cpython-312.pyc b/asl_sign/__pycache__/urls.cpython-312.pyc new file mode 100644 index 000000000..743c615a5 Binary files /dev/null and b/asl_sign/__pycache__/urls.cpython-312.pyc differ diff --git a/asl_sign/__pycache__/urls.cpython-313.pyc b/asl_sign/__pycache__/urls.cpython-313.pyc new file mode 100644 index 000000000..29e26e260 Binary files /dev/null and b/asl_sign/__pycache__/urls.cpython-313.pyc differ diff --git a/asl_sign/__pycache__/urls.cpython-39.pyc b/asl_sign/__pycache__/urls.cpython-39.pyc new file mode 100644 index 000000000..bfa459173 Binary files /dev/null and b/asl_sign/__pycache__/urls.cpython-39.pyc differ diff --git a/asl_sign/__pycache__/views.cpython-311.pyc b/asl_sign/__pycache__/views.cpython-311.pyc new file mode 100644 index 000000000..c4b4fe0b2 Binary files /dev/null and b/asl_sign/__pycache__/views.cpython-311.pyc differ diff --git a/asl_sign/__pycache__/views.cpython-312.pyc b/asl_sign/__pycache__/views.cpython-312.pyc new file mode 100644 index 000000000..fb9ac0103 Binary files /dev/null and b/asl_sign/__pycache__/views.cpython-312.pyc differ diff --git a/asl_sign/__pycache__/views.cpython-313.pyc b/asl_sign/__pycache__/views.cpython-313.pyc new file mode 100644 index 000000000..ac748a503 Binary files /dev/null and b/asl_sign/__pycache__/views.cpython-313.pyc differ diff --git a/asl_sign/__pycache__/views.cpython-39.pyc b/asl_sign/__pycache__/views.cpython-39.pyc new file mode 100644 index 000000000..ef00a03ca Binary files /dev/null and b/asl_sign/__pycache__/views.cpython-39.pyc differ diff --git a/asl_sign/admin.py b/asl_sign/admin.py new file mode 100644 index 000000000..8c38f3f3d --- /dev/null +++ b/asl_sign/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/asl_sign/apps.py b/asl_sign/apps.py new file mode 100644 index 000000000..f50645423 --- /dev/null +++ b/asl_sign/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AslSignConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'asl_sign' diff --git a/asl_sign/migrations/0001_initial.py b/asl_sign/migrations/0001_initial.py new file mode 100644 index 000000000..5cf1b9950 --- /dev/null +++ b/asl_sign/migrations/0001_initial.py @@ -0,0 +1,22 @@ +# Generated by Django 5.1.7 on 2025-03-29 05:59 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='ASLSign', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('character', models.CharField(max_length=1, unique=True)), + ('image_path', models.TextField()), + ], + ), + ] diff --git a/asl_sign/migrations/0002_alter_aslsign_image_path.py b/asl_sign/migrations/0002_alter_aslsign_image_path.py new file mode 100644 index 000000000..57b59fe3d --- /dev/null +++ b/asl_sign/migrations/0002_alter_aslsign_image_path.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.7 on 2025-03-29 08:19 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('asl_sign', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='aslsign', + name='image_path', + field=models.CharField(max_length=255), + ), + ] diff --git a/asl_sign/migrations/__init__.py b/asl_sign/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/asl_sign/migrations/__pycache__/0001_initial.cpython-311.pyc b/asl_sign/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 000000000..edb972285 Binary files /dev/null and b/asl_sign/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/asl_sign/migrations/__pycache__/0001_initial.cpython-312.pyc b/asl_sign/migrations/__pycache__/0001_initial.cpython-312.pyc new file mode 100644 index 000000000..9f1c8ebd7 Binary files /dev/null and b/asl_sign/migrations/__pycache__/0001_initial.cpython-312.pyc differ diff --git a/asl_sign/migrations/__pycache__/0001_initial.cpython-313.pyc b/asl_sign/migrations/__pycache__/0001_initial.cpython-313.pyc new file mode 100644 index 000000000..8391b0ba6 Binary files /dev/null and b/asl_sign/migrations/__pycache__/0001_initial.cpython-313.pyc differ diff --git a/asl_sign/migrations/__pycache__/0001_initial.cpython-39.pyc b/asl_sign/migrations/__pycache__/0001_initial.cpython-39.pyc new file mode 100644 index 000000000..be0500e9f Binary files /dev/null and b/asl_sign/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-311.pyc b/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-311.pyc new file mode 100644 index 000000000..b7114b620 Binary files /dev/null and b/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-311.pyc differ diff --git a/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-312.pyc b/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-312.pyc new file mode 100644 index 000000000..2c4b254bf Binary files /dev/null and b/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-312.pyc differ diff --git a/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-313.pyc b/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-313.pyc new file mode 100644 index 000000000..0aa9f8c7c Binary files /dev/null and b/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-313.pyc differ diff --git a/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-39.pyc b/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-39.pyc new file mode 100644 index 000000000..5d28bc02a Binary files /dev/null and b/asl_sign/migrations/__pycache__/0002_alter_aslsign_image_path.cpython-39.pyc differ diff --git a/asl_sign/migrations/__pycache__/__init__.cpython-311.pyc b/asl_sign/migrations/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..ed8f0d321 Binary files /dev/null and b/asl_sign/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/asl_sign/migrations/__pycache__/__init__.cpython-312.pyc b/asl_sign/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..9ce3ffad7 Binary files /dev/null and b/asl_sign/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/asl_sign/migrations/__pycache__/__init__.cpython-313.pyc b/asl_sign/migrations/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..e773000dc Binary files /dev/null and b/asl_sign/migrations/__pycache__/__init__.cpython-313.pyc differ diff --git a/asl_sign/migrations/__pycache__/__init__.cpython-39.pyc b/asl_sign/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..29cfcae5d Binary files /dev/null and b/asl_sign/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/asl_sign/models.py b/asl_sign/models.py new file mode 100644 index 000000000..e6e0b0740 --- /dev/null +++ b/asl_sign/models.py @@ -0,0 +1,8 @@ +from django.db import models + +class ASLSign(models.Model): + character = models.CharField(max_length=1, unique=True) # A-Z, 0-9, space + image_path = models.CharField(max_length=255) # Path to image file + + def __str__(self): + return self.character diff --git a/asl_sign/templates/display_asl.html b/asl_sign/templates/display_asl.html new file mode 100644 index 000000000..54dd7a5f5 --- /dev/null +++ b/asl_sign/templates/display_asl.html @@ -0,0 +1,123 @@ +{% load static %} + + + + + + + ASL Sign Display + + + + + +
+

ASL Sign Display

+

{{ input_text }}

+ +
+
+ ASL Sign +
+
+ + + {{ image_urls|json_script:"asl_images" }} + + + + + diff --git a/asl_sign/templates/input_text.html b/asl_sign/templates/input_text.html new file mode 100644 index 000000000..0b3f0c853 --- /dev/null +++ b/asl_sign/templates/input_text.html @@ -0,0 +1,79 @@ + + + + + + Text to ASL Converter + + + + +
+

Convert Text to ASL Sign Language

+
+ +
+ +
+
+ + + diff --git a/asl_sign/templates/show_asl.html b/asl_sign/templates/show_asl.html new file mode 100644 index 000000000..e0b094910 --- /dev/null +++ b/asl_sign/templates/show_asl.html @@ -0,0 +1,68 @@ +{% comment %} + + + + + ASL Sign Display + + + +

ASL Sign Display

+ ASL Sign + + + {% endcomment %} + + + + + + + ASL Sign Display + + + +

ASL Sign Display

+ ASL Sign + + + + + diff --git a/asl_sign/templates/text_to_sign.html b/asl_sign/templates/text_to_sign.html new file mode 100644 index 000000000..235b0002c --- /dev/null +++ b/asl_sign/templates/text_to_sign.html @@ -0,0 +1,45 @@ + + + + + + Text to ASL Video + + + +

ASL Conversion for: "{{ request.GET.text }}"

+ +
+ {% for image in asl_images %} + ASL Sign + {% endfor %} +
+ + {% if video_path %} +

Generated ASL Video

+ + {% endif %} + + diff --git a/asl_sign/tests.py b/asl_sign/tests.py new file mode 100644 index 000000000..7ce503c2d --- /dev/null +++ b/asl_sign/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/asl_sign/urls.py b/asl_sign/urls.py new file mode 100644 index 000000000..d2cce8093 --- /dev/null +++ b/asl_sign/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from .views import text_to_sign, input_page + +urlpatterns = [ + path('input/', input_page, name='input_page'), # ✅ Default page for input + path('text-to-sign/', text_to_sign, name='text_to_sign'), +] diff --git a/asl_sign/views.py b/asl_sign/views.py new file mode 100644 index 000000000..64476a4a3 --- /dev/null +++ b/asl_sign/views.py @@ -0,0 +1,53 @@ +import os +import cv2 +import sqlite3 +from django.shortcuts import render +from django.http import HttpResponse +from django.conf import settings + +# Connect to SQLite Database +DB_PATH = os.path.join(settings.BASE_DIR, 'db.sqlite3') + +def input_page(request): + return render(request, 'input_text.html') + +def text_to_sign(request): + text = request.GET.get('text', '').upper() # Convert text to uppercase + if not text: + return HttpResponse("No text provided.") + + # Fetch images for each character + image_urls = [] + with sqlite3.connect(DB_PATH) as conn: + cursor = conn.cursor() + for char in text: + cursor.execute("SELECT image_path FROM asl_signs WHERE character=?", (char,)) + result = cursor.fetchone() + if result: + image_url = os.path.join(settings.STATIC_URL, os.path.relpath(result[0], 'static')) + image_urls.append(image_url) + if not image_urls: + return HttpResponse("No ASL signs found for the input.") + + return render(request, 'display_asl.html', {'image_urls': image_urls, 'input_text': text}) + +def display_images_one_by_one(image_paths): + """Show images one by one in a separate window.""" + if not image_paths: + print("No images found for display.") + return None + + print(f"🖼️ Displaying {len(image_paths)} images one by one...") + + cv2.namedWindow("ASL Sign", cv2.WINDOW_NORMAL) + for img_path in image_paths: + frame = cv2.imread(img_path) + if frame is None: + print(f"⚠️ Skipping missing/corrupted image: {img_path}") + continue # Skip corrupted frames + + cv2.imshow("ASL Sign", frame) # Show image + cv2.waitKey(1500) + + cv2.destroyAllWindows() + diff --git a/db.sqlite3 b/db.sqlite3 new file mode 100644 index 000000000..a193b2bf2 Binary files /dev/null and b/db.sqlite3 differ diff --git a/debug.log b/debug.log new file mode 100644 index 000000000..9e5984af4 --- /dev/null +++ b/debug.log @@ -0,0 +1,1798 @@ +2025-03-30 04:56:46,927 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 04:57:24,694 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 04:58:15,926 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 04:59:10,430 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 04:59:16,579 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:25:28,272 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:26:04,852 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:26:09,304 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:26:15,965 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:26:21,252 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:26:51,322 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:26:54,908 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:27:11,249 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:27:16,605 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:28:10,134 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:28:14,721 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:28:19,263 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:28:24,777 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:28:29,138 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:28:33,929 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:29:00,236 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:29:32,874 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:29:37,495 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:29:50,420 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:30:03,297 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:30:09,407 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 128, in generate_study_plan_view + console.log("User:", user) +NameError: name 'console' is not defined +2025-03-30 09:30:18,001 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:30:21,218 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:30:47,402 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:30:52,020 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:30:55,337 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:35:23,103 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:37:57,576 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:38:04,885 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:38:15,492 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 89, in _execute + return self.cursor.execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute + return super().execute(query, params) +sqlite3.IntegrityError: NOT NULL constraint failed: AIPlanner_extendeduserprofile.skill_level + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 135, in generate_study_plan_view + user_profile.save() + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\base.py", line 814, in save + self.save_base( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\base.py", line 877, in save_base + updated = self._save_table( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\base.py", line 990, in _save_table + updated = self._do_update( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\base.py", line 1054, in _do_update + return filtered._update(values) > 0 + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1231, in _update + return query.get_compiler(self.db).execute_sql(CURSOR) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\compiler.py", line 1984, in execute_sql + cursor = super().execute_sql(result_type) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\compiler.py", line 1562, in execute_sql + cursor.execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 102, in execute + return super().execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 67, in execute + return self._execute_with_wrappers( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers + return executor(sql, params, many, context) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 89, in _execute + return self.cursor.execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\utils.py", line 91, in __exit__ + raise dj_exc_value.with_traceback(traceback) from exc_value + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 89, in _execute + return self.cursor.execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute + return super().execute(query, params) +django.db.utils.IntegrityError: NOT NULL constraint failed: AIPlanner_extendeduserprofile.skill_level +2025-03-30 09:38:50,447 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:38:58,151 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:39:07,367 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:39:12,244 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 89, in _execute + return self.cursor.execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute + return super().execute(query, params) +sqlite3.IntegrityError: NOT NULL constraint failed: AIPlanner_extendeduserprofile.skill_level + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 135, in generate_study_plan_view + user_profile.save() + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\base.py", line 814, in save + self.save_base( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\base.py", line 877, in save_base + updated = self._save_table( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\base.py", line 990, in _save_table + updated = self._do_update( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\base.py", line 1054, in _do_update + return filtered._update(values) > 0 + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1231, in _update + return query.get_compiler(self.db).execute_sql(CURSOR) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\compiler.py", line 1984, in execute_sql + cursor = super().execute_sql(result_type) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\compiler.py", line 1562, in execute_sql + cursor.execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 102, in execute + return super().execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 67, in execute + return self._execute_with_wrappers( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers + return executor(sql, params, many, context) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 89, in _execute + return self.cursor.execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\utils.py", line 91, in __exit__ + raise dj_exc_value.with_traceback(traceback) from exc_value + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\utils.py", line 89, in _execute + return self.cursor.execute(sql, params) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute + return super().execute(query, params) +django.db.utils.IntegrityError: NOT NULL constraint failed: AIPlanner_extendeduserprofile.skill_level +2025-03-30 09:39:17,733 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:39:24,288 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:39:31,416 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:39:38,684 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:40:20,279 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:41:03,458 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:44:10,915 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:44:15,738 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:44:30,195 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:44:35,226 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:44:50,781 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 131, in generate_study_plan_view + form = NameForm(request.POST) +NameError: name 'NameForm' is not defined +2025-03-30 09:45:02,456 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:45:08,380 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:45:22,890 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:45:40,513 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:45:46,828 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:45:52,638 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:46:04,851 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:46:12,599 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:46:17,463 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:46:23,139 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:46:27,794 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:46:31,581 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:46:44,330 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:46:48,638 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:46:53,189 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:46:58,312 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:50:26,654 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\forms.py changed, reloading. +2025-03-30 09:50:39,070 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:50:54,229 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:51:46,904 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:51:50,891 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:52:02,945 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:52:40,957 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:52:48,516 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:53:05,974 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:53:25,758 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:53:35,390 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:53:47,832 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:53:54,253 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:54:08,897 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:54:15,755 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:55:21,497 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:55:44,474 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:56:36,396 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:56:48,891 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 137, in generate_study_plan_view + # user_profile.skill_level = request.POST.get('skill_level') +NameError: name 'form' is not defined +2025-03-30 09:57:09,937 - DEBUG - Trigger Block Response: + + + +LemmeBuild + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Welcome back!

Don't have an account? Register .
or

By signing in, you agree to our Terms of Service .

+ +2025-03-30 09:57:09,943 - ERROR - Unexpected Error +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 59, in generate_study_plan + return json.loads(response_data) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads + return _default_decoder.decode(s) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode + obj, end = self.raw_decode(s, idx=_w(s, 0).end()) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode + raise JSONDecodeError("Expecting value", s, err.value) from None +json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) +2025-03-30 09:57:23,674 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:57:28,406 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:57:34,076 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:57:39,022 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:57:52,180 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:58:00,072 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:58:09,325 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:58:27,358 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 09:58:31,993 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:58:36,490 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:58:49,634 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:59:17,041 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 09:59:47,158 - DEBUG - Trigger Block Response: + + + +LemmeBuild + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Welcome back!

Don't have an account? Register .
or

By signing in, you agree to our Terms of Service .

+ +2025-03-30 09:59:47,169 - ERROR - Unexpected Error +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 59, in generate_study_plan + return json.loads(response_data) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads + return _default_decoder.decode(s) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode + obj, end = self.raw_decode(s, idx=_w(s, 0).end()) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode + raise JSONDecodeError("Expecting value", s, err.value) from None +json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) +2025-03-30 10:00:46,319 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:00:53,645 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:00:59,538 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 10:01:09,532 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:01:39,330 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:01:43,348 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 10:01:49,119 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:02:12,011 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 10:03:38,269 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:03:44,054 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:03:50,217 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 10:17:32,385 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:17:39,141 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:20:23,444 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:20:28,143 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:20:35,882 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:21:26,766 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:21:53,003 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:22:01,055 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:22:12,214 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:22:40,928 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 142, in generate_study_plan_view + study_plan = generate_study_plan(user_profile, courses, exercises) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 46, in generate_study_plan + req = urllib.request.Request(workflow_url, data=json_data, headers={"Content-Type": "application/json"}, method="POST") +NameError: name 'url' is not defined +2025-03-30 10:23:01,503 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 10:24:49,335 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:25:30,338 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 10:25:50,876 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 18:28:28,636 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:28:34,674 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:28:39,466 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:28:43,878 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:30:34,618 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:30:42,411 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:30:57,034 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:31:03,651 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:31:08,518 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:31:45,537 - WARNING - Forbidden (CSRF token from the 'X-Csrftoken' HTTP header incorrect.): /plan/generate-study-plan/ +2025-03-30 18:32:05,990 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2053, in get_prep_value + return int(value) +TypeError: int() argument must be a string, a bytes-like object or a number, not 'SimpleLazyObject' + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 103, in generate_study_plan_view + user_profile, created = ExtendedUserProfile.objects.get_or_create(user=user) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\manager.py", line 87, in manager_method + return getattr(self.get_queryset(), name)(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 916, in get_or_create + return self.get(**kwargs), False + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 623, in get + clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1436, in filter + return self._filter_or_exclude(False, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1454, in _filter_or_exclude + clone._filter_or_exclude_inplace(negate, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1461, in _filter_or_exclude_inplace + self._query.add_q(Q(*args, **kwargs)) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1546, in add_q + clause, _ = self._add_q(q_object, self.used_aliases) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1577, in _add_q + child_clause, needed_inner = self.build_filter( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1492, in build_filter + condition = self.build_lookup(lookups, col, value) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1319, in build_lookup + lookup = lookup_class(lhs, rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\lookups.py", line 27, in __init__ + self.rhs = self.get_prep_lookup() + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\related_lookups.py", line 166, in get_prep_lookup + self.rhs = target_field.get_prep_value(self.rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2055, in get_prep_value + raise e.__class__( +TypeError: Field 'id' expected a number but got >. +2025-03-30 18:33:48,399 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2053, in get_prep_value + return int(value) +TypeError: int() argument must be a string, a bytes-like object or a number, not 'SimpleLazyObject' + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 103, in generate_study_plan_view + user_profile, created = ExtendedUserProfile.objects.get_or_create(user=user) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\manager.py", line 87, in manager_method + return getattr(self.get_queryset(), name)(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 916, in get_or_create + return self.get(**kwargs), False + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 623, in get + clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1436, in filter + return self._filter_or_exclude(False, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1454, in _filter_or_exclude + clone._filter_or_exclude_inplace(negate, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1461, in _filter_or_exclude_inplace + self._query.add_q(Q(*args, **kwargs)) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1546, in add_q + clause, _ = self._add_q(q_object, self.used_aliases) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1577, in _add_q + child_clause, needed_inner = self.build_filter( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1492, in build_filter + condition = self.build_lookup(lookups, col, value) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1319, in build_lookup + lookup = lookup_class(lhs, rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\lookups.py", line 27, in __init__ + self.rhs = self.get_prep_lookup() + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\related_lookups.py", line 166, in get_prep_lookup + self.rhs = target_field.get_prep_value(self.rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2055, in get_prep_value + raise e.__class__( +TypeError: Field 'id' expected a number but got >. +2025-03-30 18:35:30,109 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:35:39,068 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2053, in get_prep_value + return int(value) +TypeError: int() argument must be a string, a bytes-like object or a number, not 'SimpleLazyObject' + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 103, in generate_study_plan_view + user_profile, created = ExtendedUserProfile.objects.get_or_create(user=user) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\manager.py", line 87, in manager_method + return getattr(self.get_queryset(), name)(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 916, in get_or_create + return self.get(**kwargs), False + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 623, in get + clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1436, in filter + return self._filter_or_exclude(False, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1454, in _filter_or_exclude + clone._filter_or_exclude_inplace(negate, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1461, in _filter_or_exclude_inplace + self._query.add_q(Q(*args, **kwargs)) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1546, in add_q + clause, _ = self._add_q(q_object, self.used_aliases) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1577, in _add_q + child_clause, needed_inner = self.build_filter( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1492, in build_filter + condition = self.build_lookup(lookups, col, value) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1319, in build_lookup + lookup = lookup_class(lhs, rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\lookups.py", line 27, in __init__ + self.rhs = self.get_prep_lookup() + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\related_lookups.py", line 166, in get_prep_lookup + self.rhs = target_field.get_prep_value(self.rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2055, in get_prep_value + raise e.__class__( +TypeError: Field 'id' expected a number but got >. +2025-03-30 18:47:15,005 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:50:29,668 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2053, in get_prep_value + return int(value) +TypeError: int() argument must be a string, a bytes-like object or a number, not 'SimpleLazyObject' + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 103, in generate_study_plan_view + user_profile, created = ExtendedUserProfile.objects.get_or_create(user=user) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\manager.py", line 87, in manager_method + return getattr(self.get_queryset(), name)(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 916, in get_or_create + return self.get(**kwargs), False + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 623, in get + clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1436, in filter + return self._filter_or_exclude(False, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1454, in _filter_or_exclude + clone._filter_or_exclude_inplace(negate, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1461, in _filter_or_exclude_inplace + self._query.add_q(Q(*args, **kwargs)) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1546, in add_q + clause, _ = self._add_q(q_object, self.used_aliases) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1577, in _add_q + child_clause, needed_inner = self.build_filter( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1492, in build_filter + condition = self.build_lookup(lookups, col, value) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1319, in build_lookup + lookup = lookup_class(lhs, rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\lookups.py", line 27, in __init__ + self.rhs = self.get_prep_lookup() + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\related_lookups.py", line 166, in get_prep_lookup + self.rhs = target_field.get_prep_value(self.rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2055, in get_prep_value + raise e.__class__( +TypeError: Field 'id' expected a number but got >. +2025-03-30 18:52:30,913 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 18:52:45,691 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2053, in get_prep_value + return int(value) +TypeError: int() argument must be a string, a bytes-like object or a number, not 'SimpleLazyObject' + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 107, in generate_study_plan_view + user_profile, created = ExtendedUserProfile.objects.get_or_create(user=user) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\manager.py", line 87, in manager_method + return getattr(self.get_queryset(), name)(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 916, in get_or_create + return self.get(**kwargs), False + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 623, in get + clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1436, in filter + return self._filter_or_exclude(False, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1454, in _filter_or_exclude + clone._filter_or_exclude_inplace(negate, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1461, in _filter_or_exclude_inplace + self._query.add_q(Q(*args, **kwargs)) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1546, in add_q + clause, _ = self._add_q(q_object, self.used_aliases) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1577, in _add_q + child_clause, needed_inner = self.build_filter( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1492, in build_filter + condition = self.build_lookup(lookups, col, value) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1319, in build_lookup + lookup = lookup_class(lhs, rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\lookups.py", line 27, in __init__ + self.rhs = self.get_prep_lookup() + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\related_lookups.py", line 166, in get_prep_lookup + self.rhs = target_field.get_prep_value(self.rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2055, in get_prep_value + raise e.__class__( +TypeError: Field 'id' expected a number but got >. +2025-03-30 18:58:14,740 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2053, in get_prep_value + return int(value) +TypeError: int() argument must be a string, a bytes-like object or a number, not 'SimpleLazyObject' + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 107, in generate_study_plan_view + user_profile, created = ExtendedUserProfile.objects.get_or_create(user=user) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\manager.py", line 87, in manager_method + return getattr(self.get_queryset(), name)(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 916, in get_or_create + return self.get(**kwargs), False + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 623, in get + clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1436, in filter + return self._filter_or_exclude(False, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1454, in _filter_or_exclude + clone._filter_or_exclude_inplace(negate, args, kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\query.py", line 1461, in _filter_or_exclude_inplace + self._query.add_q(Q(*args, **kwargs)) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1546, in add_q + clause, _ = self._add_q(q_object, self.used_aliases) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1577, in _add_q + child_clause, needed_inner = self.build_filter( + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1492, in build_filter + condition = self.build_lookup(lookups, col, value) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\sql\query.py", line 1319, in build_lookup + lookup = lookup_class(lhs, rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\lookups.py", line 27, in __init__ + self.rhs = self.get_prep_lookup() + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\related_lookups.py", line 166, in get_prep_lookup + self.rhs = target_field.get_prep_value(self.rhs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\db\models\fields\__init__.py", line 2055, in get_prep_value + raise e.__class__( +TypeError: Field 'id' expected a number but got >. +2025-03-30 19:02:06,251 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:02:22,253 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:02:27,706 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:02:35,627 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:02:40,128 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:03:20,651 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\contrib\auth\decorators.py", line 23, in _wrapper_view + return view_func(request, *args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 129, in generate_study_plan_view + study_plan = generate_study_plan(user_profile, courses, exercises) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 36, in generate_study_plan + "preferred_days": [i.strip() for i in user_profile.preferred_days.split(",")], +AttributeError: 'list' object has no attribute 'split' +2025-03-30 19:04:14,848 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:04:25,658 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 19:04:28,813 - DEBUG - Trigger Block Response: {"data":{"study_plan":{"Week 1":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":5,"Tasks":["Introduction to Basic Communication","Common Greetings and Phrases"]},"Tuesday":{"Hours":5,"Tasks":["Understanding Daily Life Vocabulary","Basic Sentence Structure"]}},"Week 2":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":5,"Tasks":["Conversational Practice","Role-playing Daily Scenarios"]},"Tuesday":{"Hours":5,"Tasks":["Listening Comprehension Exercises","Simple Reading Tasks"]}},"Week 3":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":5,"Tasks":["Review and Practice of Previous Lessons","Interactive Speaking Activities"]},"Tuesday":{"Hours":5,"Tasks":["Basic Writing Exercises","Daily Life Conversations"]}},"Week 4":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":5,"Tasks":["Advanced Vocabulary Building","Complex Sentence Formation"]},"Tuesday":{"Hours":5,"Tasks":["Final Review and Assessment","Feedback and Future Planning"]}}},"expected_completion_date":"End of Week 4"},"success":true} +2025-03-30 19:10:24,806 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:10:32,508 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:13:04,771 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\contrib\auth\decorators.py", line 23, in _wrapper_view + return view_func(request, *args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 114, in generate_study_plan_view + body = json.loads(body_unicode) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads + return _default_decoder.decode(s) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode + obj, end = self.raw_decode(s, idx=_w(s, 0).end()) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode + raise JSONDecodeError("Expecting value", s, err.value) from None +json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) +2025-03-30 19:33:21,554 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:33:26,336 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:33:37,304 - WARNING - Bad Request: /plan/generate-study-plan/ +2025-03-30 19:33:47,292 - WARNING - Bad Request: /plan/generate-study-plan/ +2025-03-30 19:34:43,011 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:34:52,085 - WARNING - Bad Request: /plan/generate-study-plan/ +2025-03-30 19:35:17,900 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:35:28,298 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\contrib\auth\decorators.py", line 23, in _wrapper_view + return view_func(request, *args, **kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 114, in generate_study_plan_view + body = json.loads(body_unicode) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads + return _default_decoder.decode(s) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode + obj, end = self.raw_decode(s, idx=_w(s, 0).end()) + File "C:\Users\aishn\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode + raise JSONDecodeError("Expecting value", s, err.value) from None +json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) +2025-03-30 19:36:02,608 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:38:34,435 - WARNING - Bad Request: /plan/generate-study-plan/ +2025-03-30 19:38:39,127 - WARNING - Bad Request: /plan/generate-study-plan/ +2025-03-30 19:38:48,277 - WARNING - Bad Request: /plan/generate-study-plan/ +2025-03-30 19:41:29,471 - WARNING - Bad Request: /plan/generate-study-plan/ +2025-03-30 19:43:27,156 - WARNING - Bad Request: /plan/generate-study-plan/ +2025-03-30 19:44:48,389 - WARNING - Bad Request: /plan/generate-study-plan/ +2025-03-30 19:52:12,669 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:52:33,316 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:54:14,681 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:54:36,869 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:57:08,198 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:57:10,004 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:57:18,081 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 19:57:28,890 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 19:59:53,140 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:00:01,796 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:00:38,896 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:02:45,881 - ERROR - Internal Server Error: /plan/generate-study-plan/ +Traceback (most recent call last): + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Work\Projects\HTF\Hack-the-Future\venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 127, in generate_study_plan_view + study_plan = generate_study_plan(user_profile, courses, exercises) + File "C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py", line 36, in generate_study_plan + "preferred_days": [i.strip() for i in user_profile.preferred_days.split(",")], +AttributeError: 'list' object has no attribute 'split' +2025-03-30 20:02:59,572 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:04:15,360 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:04:23,510 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:04:30,468 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:06:35,209 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:07:50,704 - DEBUG - Trigger Block Response: {"data":{"study_plan":{"Week 1":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":1,"Tasks":["Introduction to Basic Communication"]},"Tuesday":{"Hours":1,"Tasks":["Common Greetings and Phrases"]}},"Week 2":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":1,"Tasks":["Understanding Daily Life Vocabulary"]},"Tuesday":{"Hours":1,"Tasks":["Basic Sentence Structure"]}},"Week 3":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":1,"Tasks":["Conversational Practice"]},"Tuesday":{"Hours":1,"Tasks":["Role-playing Daily Scenarios"]}},"Week 4":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":1,"Tasks":["Listening Comprehension Exercises"]},"Tuesday":{"Hours":1,"Tasks":["Simple Reading Tasks"]}},"Week 5":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":1,"Tasks":["Review and Practice of Previous Lessons"]},"Tuesday":{"Hours":1,"Tasks":["Interactive Speaking Activities"]}},"Week 6":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":1,"Tasks":["Basic Writing Exercises"]},"Tuesday":{"Hours":1,"Tasks":["Daily Life Conversations"]}},"Week 7":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":1,"Tasks":["Advanced Vocabulary Building"]},"Tuesday":{"Hours":1,"Tasks":["Complex Sentence Formation"]}},"Week 8":{"Course":"Basic Communication & Daily Life","Monday":{"Hours":1,"Tasks":["Final Review and Assessment"]},"Tuesday":{"Hours":1,"Tasks":["Feedback and Future Planning"]}}},"expected_completion_date":"End of Week 8"},"success":true} +2025-03-30 20:11:05,653 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:11:45,827 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:13:24,432 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:13:30,745 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:14:15,609 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:15:18,355 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:15:22,670 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:15:28,914 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:15:51,072 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:15:56,056 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:15:59,978 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:16:08,118 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:16:24,806 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:16:49,583 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:18:24,366 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:18:28,181 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:18:34,136 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:18:41,178 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 20:18:50,322 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:20:52,159 - ERROR - HTTPError: 403, Details: error code: 1010 +2025-03-30 20:22:32,569 - INFO - C:\Work\Projects\HTF\Hack-the-Future\AIPlanner\views.py changed, reloading. +2025-03-30 21:19:15,567 - WARNING - Not Found: /favicon.ico +2025-03-30 21:19:39,313 - ERROR - Internal Server Error: /speech/transcribe/ +Traceback (most recent call last): + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\views\decorators\csrf.py", line 65, in _view_wrapper + return view_func(request, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py", line 24, in record_and_transcribe + requests.post(input_url, json={"text": text}) + ^^^^^^^^ +NameError: name 'requests' is not defined. Did you mean: 'request'? +2025-03-30 21:19:39,317 - ERROR - Internal Server Error: /speech/transcribe/ +Traceback (most recent call last): + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\views\decorators\csrf.py", line 65, in _view_wrapper + return view_func(request, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py", line 24, in record_and_transcribe + requests.post(input_url, json={"text": text}) + ^^^^^^^^ +NameError: name 'requests' is not defined. Did you mean: 'request'? +2025-03-30 21:21:04,986 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 21:21:30,384 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 21:21:30,464 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 21:21:46,661 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 21:21:46,679 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:21:46,683 - DEBUG - http://127.0.0.1:8000 "POST /dashboard/input/ HTTP/1.1" 404 9703 +2025-03-30 21:21:46,687 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 21:21:46,709 - WARNING - Not Found: /dashboard/text-to-sign/ +2025-03-30 21:21:46,713 - DEBUG - http://127.0.0.1:8000 "GET /dashboard/text-to-sign/?text=hello%20hello HTTP/1.1" 404 9742 +2025-03-30 21:21:46,716 - ERROR - Internal Server Error: /speech/transcribe/ +2025-03-30 21:24:46,968 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:24:47,984 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:24:50,316 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:24:53,783 - WARNING - Not Found: /input +2025-03-30 21:24:56,447 - WARNING - Not Found: /input +2025-03-30 21:25:17,690 - WARNING - Not Found: /text-to-sign +2025-03-30 21:26:15,695 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:26:16,822 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:26:48,643 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:26:50,129 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:26:59,832 - WARNING - Not Found: /login/dashboard/input +2025-03-30 21:28:03,047 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:28:05,210 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:35:38,520 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:35:43,210 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:40:23,800 - WARNING - Not Found: /dashboard/input/ +2025-03-30 21:40:47,880 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\Dashboard\views.py changed, reloading. +2025-03-30 21:41:20,738 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 21:41:35,892 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 21:42:11,539 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 21:42:11,584 - WARNING - Forbidden (CSRF cookie not set.): /input/ +2025-03-30 21:42:11,585 - DEBUG - http://127.0.0.1:8000 "POST /input/ HTTP/1.1" 403 2855 +2025-03-30 21:42:11,588 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 21:42:11,594 - DEBUG - http://127.0.0.1:8000 "GET /text-to-sign/?text=hello%20hello%20hello HTTP/1.1" 200 1916 +2025-03-30 21:42:11,639 - ERROR - Internal Server Error: /speech/transcribe/ +Traceback (most recent call last): + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 971, in json + return complexjson.loads(self.text, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\json\__init__.py", line 346, in loads + return _default_decoder.decode(s) + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 337, in decode + obj, end = self.raw_decode(s, idx=_w(s, 0).end()) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 355, in raw_decode + raise JSONDecodeError("Expecting value", s, err.value) from None +json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 2) + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\views\decorators\csrf.py", line 65, in _view_wrapper + return view_func(request, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py", line 32, in record_and_transcribe + sign_output = response.json().get("sign_language_output") + ^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 975, in json + raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) +requests.exceptions.JSONDecodeError: Expecting value: line 3 column 1 (char 2) +2025-03-30 21:42:19,112 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 21:42:19,115 - WARNING - Forbidden (CSRF cookie not set.): /input/ +2025-03-30 21:42:19,116 - DEBUG - http://127.0.0.1:8000 "POST /input/ HTTP/1.1" 403 2855 +2025-03-30 21:42:19,118 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 21:42:19,124 - DEBUG - http://127.0.0.1:8000 "GET /text-to-sign/?text=Achcha%20error%20a%20raha%20hai HTTP/1.1" 200 2080 +2025-03-30 21:42:19,147 - ERROR - Internal Server Error: /speech/transcribe/ +Traceback (most recent call last): + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 971, in json + return complexjson.loads(self.text, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\json\__init__.py", line 346, in loads + return _default_decoder.decode(s) + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 337, in decode + obj, end = self.raw_decode(s, idx=_w(s, 0).end()) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 355, in raw_decode + raise JSONDecodeError("Expecting value", s, err.value) from None +json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 2) + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\views\decorators\csrf.py", line 65, in _view_wrapper + return view_func(request, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py", line 32, in record_and_transcribe + sign_output = response.json().get("sign_language_output") + ^^^^^^^^^^^^^^^ + File "C:\Users\YASHVI KHATRI\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 975, in json + raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) +requests.exceptions.JSONDecodeError: Expecting value: line 3 column 1 (char 2) +2025-03-30 21:45:26,270 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 21:46:10,404 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 21:46:10,411 - WARNING - Forbidden (CSRF cookie not set.): /input/ +2025-03-30 21:46:10,414 - DEBUG - http://127.0.0.1:8000 "POST /input/ HTTP/1.1" 403 2855 +2025-03-30 21:46:10,415 - ERROR - Internal Server Error: /speech/transcribe/ +2025-03-30 21:46:13,542 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 21:48:33,331 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 21:49:13,773 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 21:49:21,329 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 21:49:21,337 - WARNING - Forbidden (CSRF cookie not set.): /input/ +2025-03-30 21:49:21,339 - DEBUG - http://127.0.0.1:8000 "POST /input/ HTTP/1.1" 403 2855 +2025-03-30 21:49:21,340 - ERROR - Internal Server Error: /speech/transcribe/ +2025-03-30 21:52:52,995 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 21:52:55,887 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 21:53:43,832 - WARNING - Forbidden (CSRF token from the 'X-Csrftoken' HTTP header has incorrect length.): /input/ +2025-03-30 21:53:46,464 - WARNING - Forbidden (CSRF token from the 'X-Csrftoken' HTTP header has incorrect length.): /input/ +2025-03-30 21:54:05,280 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 21:54:05,348 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 21:57:02,493 - WARNING - Method Not Allowed: /speech/transcribe/ +2025-03-30 21:57:04,810 - WARNING - Method Not Allowed: /speech/transcribe/ +2025-03-30 21:58:00,709 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 21:58:01,227 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 21:58:01,935 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:03:25,183 - WARNING - Method Not Allowed: /speech/transcribe/ +2025-03-30 22:07:52,973 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 22:07:52,979 - WARNING - Forbidden (CSRF cookie not set.): /input/ +2025-03-30 22:07:52,980 - DEBUG - http://127.0.0.1:8000 "POST /input/ HTTP/1.1" 403 2855 +2025-03-30 22:07:52,981 - ERROR - Internal Server Error: /speech/transcribe/ +2025-03-30 22:08:31,576 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:09:27,391 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 22:09:27,397 - WARNING - Forbidden (CSRF cookie not set.): /input/ +2025-03-30 22:09:27,399 - DEBUG - http://127.0.0.1:8000 "POST /input/ HTTP/1.1" 403 2855 +2025-03-30 22:09:27,400 - ERROR - Internal Server Error: /speech/transcribe/ +2025-03-30 22:09:38,825 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:11:50,763 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:11:54,795 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:12:13,337 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:12:23,528 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:16:21,397 - DEBUG - Starting new HTTP connection (1): 127.0.0.1:8000 +2025-03-30 22:16:21,402 - WARNING - Forbidden (CSRF cookie not set.): /input/ +2025-03-30 22:16:21,404 - DEBUG - http://127.0.0.1:8000 "POST /input/ HTTP/1.1" 403 2855 +2025-03-30 22:16:21,405 - ERROR - Internal Server Error: /speech/transcribe/ +2025-03-30 22:16:34,508 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:20:53,873 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:22:22,310 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:22:22,343 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 22:23:47,859 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 22:24:10,089 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture-Upaay\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 23:18:38,541 - INFO - C:\Users\ashal\OneDrive\Desktop\signmaster\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 23:21:32,391 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 23:27:45,211 - INFO - C:\Users\ashal\OneDrive\Desktop\signmaster\Hack-the-Future\speech_to_text\views.py changed, reloading. +2025-03-30 23:28:01,527 - INFO - C:\Users\ashal\OneDrive\Desktop\signmaster\Hack-the-Future\speech_to_text\urls.py changed, reloading. +2025-03-30 23:29:24,400 - WARNING - Bad Request: /speech/transcribe/ +2025-03-30 23:51:05,161 - WARNING - Forbidden (CSRF token from POST incorrect.): /admin/login/ +2025-03-30 23:51:48,471 - DEBUG - Importing BlpImagePlugin +2025-03-30 23:51:48,505 - DEBUG - Importing BmpImagePlugin +2025-03-30 23:51:48,505 - DEBUG - Importing BufrStubImagePlugin +2025-03-30 23:51:48,524 - DEBUG - Importing CurImagePlugin +2025-03-30 23:51:48,611 - DEBUG - Importing DcxImagePlugin +2025-03-30 23:51:48,651 - DEBUG - Importing DdsImagePlugin +2025-03-30 23:51:48,692 - DEBUG - Importing EpsImagePlugin +2025-03-30 23:51:48,710 - DEBUG - Importing FitsImagePlugin +2025-03-30 23:51:48,734 - DEBUG - Importing FliImagePlugin +2025-03-30 23:51:48,750 - DEBUG - Importing FpxImagePlugin +2025-03-30 23:51:48,775 - DEBUG - Image: failed to import FpxImagePlugin: No module named 'olefile' +2025-03-30 23:51:48,775 - DEBUG - Importing FtexImagePlugin +2025-03-30 23:51:48,799 - DEBUG - Importing GbrImagePlugin +2025-03-30 23:51:48,816 - DEBUG - Importing GifImagePlugin +2025-03-30 23:51:48,816 - DEBUG - Importing GribStubImagePlugin +2025-03-30 23:51:48,833 - DEBUG - Importing Hdf5StubImagePlugin +2025-03-30 23:51:48,858 - DEBUG - Importing IcnsImagePlugin +2025-03-30 23:51:48,924 - DEBUG - Importing IcoImagePlugin +2025-03-30 23:51:48,956 - DEBUG - Importing ImImagePlugin +2025-03-30 23:51:48,974 - DEBUG - Importing ImtImagePlugin +2025-03-30 23:51:48,999 - DEBUG - Importing IptcImagePlugin +2025-03-30 23:51:49,028 - DEBUG - Importing JpegImagePlugin +2025-03-30 23:51:49,028 - DEBUG - Importing Jpeg2KImagePlugin +2025-03-30 23:51:49,031 - DEBUG - Importing McIdasImagePlugin +2025-03-30 23:51:49,048 - DEBUG - Importing MicImagePlugin +2025-03-30 23:51:49,073 - DEBUG - Image: failed to import MicImagePlugin: No module named 'olefile' +2025-03-30 23:51:49,073 - DEBUG - Importing MpegImagePlugin +2025-03-30 23:51:49,081 - DEBUG - Importing MpoImagePlugin +2025-03-30 23:51:49,130 - DEBUG - Importing MspImagePlugin +2025-03-30 23:51:49,155 - DEBUG - Importing PalmImagePlugin +2025-03-30 23:51:49,189 - DEBUG - Importing PcdImagePlugin +2025-03-30 23:51:49,205 - DEBUG - Importing PcxImagePlugin +2025-03-30 23:51:49,205 - DEBUG - Importing PdfImagePlugin +2025-03-30 23:51:49,263 - DEBUG - Importing PixarImagePlugin +2025-03-30 23:51:49,288 - DEBUG - Importing PngImagePlugin +2025-03-30 23:51:49,288 - DEBUG - Importing PpmImagePlugin +2025-03-30 23:51:49,288 - DEBUG - Importing PsdImagePlugin +2025-03-30 23:51:49,312 - DEBUG - Importing QoiImagePlugin +2025-03-30 23:51:49,328 - DEBUG - Importing SgiImagePlugin +2025-03-30 23:51:49,351 - DEBUG - Importing SpiderImagePlugin +2025-03-30 23:51:49,370 - DEBUG - Importing SunImagePlugin +2025-03-30 23:51:49,394 - DEBUG - Importing TgaImagePlugin +2025-03-30 23:51:49,419 - DEBUG - Importing TiffImagePlugin +2025-03-30 23:51:49,419 - DEBUG - Importing WebPImagePlugin +2025-03-30 23:51:49,508 - DEBUG - Importing WmfImagePlugin +2025-03-30 23:51:49,524 - DEBUG - Importing XbmImagePlugin +2025-03-30 23:51:49,541 - DEBUG - Importing XpmImagePlugin +2025-03-30 23:51:49,557 - DEBUG - Importing XVThumbImagePlugin +2025-03-30 23:53:04,605 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-30 23:53:04,605 - DEBUG - STREAM b'PLTE' 41 354 +2025-03-30 23:53:04,605 - DEBUG - STREAM b'IDAT' 407 7478 +2025-03-30 23:53:13,715 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-30 23:53:13,715 - DEBUG - STREAM b'PLTE' 41 363 +2025-03-30 23:53:13,715 - DEBUG - STREAM b'IDAT' 416 8192 +2025-03-30 23:53:42,216 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-30 23:53:42,216 - DEBUG - STREAM b'PLTE' 41 354 +2025-03-30 23:53:42,216 - DEBUG - STREAM b'IDAT' 407 7478 +2025-03-30 23:54:08,645 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-30 23:54:08,645 - DEBUG - STREAM b'PLTE' 41 363 +2025-03-30 23:54:08,645 - DEBUG - STREAM b'IDAT' 416 8192 +2025-03-31 10:21:13,158 - WARNING - Not Found: /favicon.ico +2025-03-31 10:22:38,317 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-31 10:22:38,317 - DEBUG - STREAM b'PLTE' 41 420 +2025-03-31 10:22:38,317 - DEBUG - STREAM b'IDAT' 473 8111 +2025-03-31 10:22:38,317 - DEBUG - Importing BlpImagePlugin +2025-03-31 10:22:38,321 - DEBUG - Importing BmpImagePlugin +2025-03-31 10:22:38,321 - DEBUG - Importing BufrStubImagePlugin +2025-03-31 10:22:38,324 - DEBUG - Importing CurImagePlugin +2025-03-31 10:22:38,326 - DEBUG - Importing DcxImagePlugin +2025-03-31 10:22:38,328 - DEBUG - Importing DdsImagePlugin +2025-03-31 10:22:38,336 - DEBUG - Importing EpsImagePlugin +2025-03-31 10:22:38,338 - DEBUG - Importing FitsImagePlugin +2025-03-31 10:22:38,340 - DEBUG - Importing FliImagePlugin +2025-03-31 10:22:38,341 - DEBUG - Importing FpxImagePlugin +2025-03-31 10:22:38,344 - DEBUG - Image: failed to import FpxImagePlugin: No module named 'olefile' +2025-03-31 10:22:38,344 - DEBUG - Importing FtexImagePlugin +2025-03-31 10:22:38,345 - DEBUG - Importing GbrImagePlugin +2025-03-31 10:22:38,347 - DEBUG - Importing GifImagePlugin +2025-03-31 10:22:38,347 - DEBUG - Importing GribStubImagePlugin +2025-03-31 10:22:38,348 - DEBUG - Importing Hdf5StubImagePlugin +2025-03-31 10:22:38,349 - DEBUG - Importing IcnsImagePlugin +2025-03-31 10:22:38,353 - DEBUG - Importing IcoImagePlugin +2025-03-31 10:22:38,356 - DEBUG - Importing ImImagePlugin +2025-03-31 10:22:38,358 - DEBUG - Importing ImtImagePlugin +2025-03-31 10:22:38,359 - DEBUG - Importing IptcImagePlugin +2025-03-31 10:22:38,361 - DEBUG - Importing JpegImagePlugin +2025-03-31 10:22:38,361 - DEBUG - Importing Jpeg2KImagePlugin +2025-03-31 10:22:38,361 - DEBUG - Importing McIdasImagePlugin +2025-03-31 10:22:38,362 - DEBUG - Importing MicImagePlugin +2025-03-31 10:22:38,363 - DEBUG - Image: failed to import MicImagePlugin: No module named 'olefile' +2025-03-31 10:22:38,363 - DEBUG - Importing MpegImagePlugin +2025-03-31 10:22:38,364 - DEBUG - Importing MpoImagePlugin +2025-03-31 10:22:38,369 - DEBUG - Importing MspImagePlugin +2025-03-31 10:22:38,371 - DEBUG - Importing PalmImagePlugin +2025-03-31 10:22:38,373 - DEBUG - Importing PcdImagePlugin +2025-03-31 10:22:38,375 - DEBUG - Importing PcxImagePlugin +2025-03-31 10:22:38,375 - DEBUG - Importing PdfImagePlugin +2025-03-31 10:22:38,392 - DEBUG - Importing PixarImagePlugin +2025-03-31 10:22:38,394 - DEBUG - Importing PngImagePlugin +2025-03-31 10:22:38,394 - DEBUG - Importing PpmImagePlugin +2025-03-31 10:22:38,394 - DEBUG - Importing PsdImagePlugin +2025-03-31 10:22:38,396 - DEBUG - Importing QoiImagePlugin +2025-03-31 10:22:38,397 - DEBUG - Importing SgiImagePlugin +2025-03-31 10:22:38,398 - DEBUG - Importing SpiderImagePlugin +2025-03-31 10:22:38,399 - DEBUG - Importing SunImagePlugin +2025-03-31 10:22:38,401 - DEBUG - Importing TgaImagePlugin +2025-03-31 10:22:38,403 - DEBUG - Importing TiffImagePlugin +2025-03-31 10:22:38,403 - DEBUG - Importing WebPImagePlugin +2025-03-31 10:22:38,472 - DEBUG - Importing WmfImagePlugin +2025-03-31 10:22:38,475 - DEBUG - Importing XbmImagePlugin +2025-03-31 10:22:38,478 - DEBUG - Importing XpmImagePlugin +2025-03-31 10:22:38,480 - DEBUG - Importing XVThumbImagePlugin +2025-03-31 10:23:09,389 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-31 10:23:09,390 - DEBUG - STREAM b'PLTE' 41 390 +2025-03-31 10:23:09,390 - DEBUG - STREAM b'IDAT' 443 8192 +2025-03-31 10:24:05,628 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-31 10:24:05,628 - DEBUG - STREAM b'PLTE' 41 405 +2025-03-31 10:24:05,628 - DEBUG - STREAM b'IDAT' 458 8175 +2025-03-31 10:24:17,093 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-31 10:24:17,093 - DEBUG - STREAM b'PLTE' 41 420 +2025-03-31 10:24:17,093 - DEBUG - STREAM b'IDAT' 473 8192 +2025-03-31 10:24:31,511 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-31 10:24:31,511 - DEBUG - STREAM b'PLTE' 41 393 +2025-03-31 10:24:31,511 - DEBUG - STREAM b'IDAT' 446 7579 +2025-03-31 10:24:45,248 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-31 10:24:45,248 - DEBUG - STREAM b'PLTE' 41 411 +2025-03-31 10:24:45,248 - DEBUG - STREAM b'IDAT' 464 7563 +2025-03-31 10:31:15,362 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-31 10:31:15,363 - DEBUG - STREAM b'PLTE' 41 420 +2025-03-31 10:31:15,363 - DEBUG - STREAM b'IDAT' 473 8111 +2025-03-31 10:44:01,895 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-31 10:44:01,895 - DEBUG - STREAM b'PLTE' 41 423 +2025-03-31 10:44:01,896 - DEBUG - STREAM b'IDAT' 476 7553 +2025-03-31 10:44:58,402 - DEBUG - STREAM b'IHDR' 16 13 +2025-03-31 10:44:58,402 - DEBUG - STREAM b'PLTE' 41 390 +2025-03-31 10:44:58,402 - DEBUG - STREAM b'IDAT' 443 7675 +2025-03-31 10:49:39,641 - ERROR - Internal Server Error: /speech/transcribe/ +Traceback (most recent call last): + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\speech_recognition\__init__.py", line 103, in get_pyaudio + import pyaudio +ModuleNotFoundError: No module named 'pyaudio' + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\django\views\decorators\csrf.py", line 65, in _view_wrapper + return view_func(request, *args, **kwargs) + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\speech_to_text\views.py", line 14, in record_and_transcribe + with sr.Microphone() as source: + ~~~~~~~~~~~~~^^ + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\speech_recognition\__init__.py", line 75, in __init__ + self.pyaudio_module = self.get_pyaudio() + ~~~~~~~~~~~~~~~~^^ + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\speech_recognition\__init__.py", line 105, in get_pyaudio + raise AttributeError("Could not find PyAudio; check installation") +AttributeError: Could not find PyAudio; check installation +2025-03-31 10:49:42,512 - ERROR - Internal Server Error: /speech/transcribe/ +Traceback (most recent call last): + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\speech_recognition\__init__.py", line 103, in get_pyaudio + import pyaudio +ModuleNotFoundError: No module named 'pyaudio' + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\django\views\decorators\csrf.py", line 65, in _view_wrapper + return view_func(request, *args, **kwargs) + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\speech_to_text\views.py", line 14, in record_and_transcribe + with sr.Microphone() as source: + ~~~~~~~~~~~~~^^ + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\speech_recognition\__init__.py", line 75, in __init__ + self.pyaudio_module = self.get_pyaudio() + ~~~~~~~~~~~~~~~~^^ + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\speech_recognition\__init__.py", line 105, in get_pyaudio + raise AttributeError("Could not find PyAudio; check installation") +AttributeError: Could not find PyAudio; check installation +2025-03-31 10:49:55,910 - ERROR - Internal Server Error: /speech/transcribe/ +Traceback (most recent call last): + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\speech_recognition\__init__.py", line 103, in get_pyaudio + import pyaudio +ModuleNotFoundError: No module named 'pyaudio' + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner + response = get_response(request) + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response + response = wrapped_callback(request, *callback_args, **callback_kwargs) + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\django\views\decorators\csrf.py", line 65, in _view_wrapper + return view_func(request, *args, **kwargs) + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\speech_to_text\views.py", line 14, in record_and_transcribe + with sr.Microphone() as source: + ~~~~~~~~~~~~~^^ + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\speech_recognition\__init__.py", line 75, in __init__ + self.pyaudio_module = self.get_pyaudio() + ~~~~~~~~~~~~~~~~^^ + File "C:\Users\lotiy\Desktop\projects\SignMaster\Hack-the-Future\.venv\Lib\site-packages\speech_recognition\__init__.py", line 105, in get_pyaudio + raise AttributeError("Could not find PyAudio; check installation") +AttributeError: Could not find PyAudio; check installation +2025-03-31 10:50:58,185 - WARNING - Bad Request: /speech/transcribe/ +2025-03-31 16:08:59,790 - WARNING - Not Found: /favicon.ico +2025-03-31 16:12:16,972 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture\Hack-the-Future\asl_sign\views.py changed, reloading. +2025-03-31 16:12:20,369 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture\Hack-the-Future\asl_sign\views.py changed, reloading. +2025-03-31 16:12:31,763 - INFO - C:\Users\YASHVI KHATRI\OneDrive\Documents\Work Folder\HackTheFuture\Hack-the-Future\asl_sign\views.py changed, reloading. +2025-03-31 17:10:54,693 - WARNING - Not Found: /favicon.ico +2025-03-31 17:38:43,436 - WARNING - Not Found: /favicon.ico +2025-04-01 09:59:37,303 - WARNING - Not Found: /favicon.ico +2025-04-01 09:59:45,151 - WARNING - Not Found: /dashboard/input/ +2025-04-01 09:59:46,758 - WARNING - Not Found: /dashboard/input/ +2025-04-01 09:59:50,641 - WARNING - Not Found: /dashboard/input/ diff --git a/gamification/__init__.py b/gamification/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/gamification/__pycache__/__init__.cpython-311.pyc b/gamification/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..6e5ed8c40 Binary files /dev/null and b/gamification/__pycache__/__init__.cpython-311.pyc differ diff --git a/gamification/__pycache__/__init__.cpython-312.pyc b/gamification/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..43fe577ef Binary files /dev/null and b/gamification/__pycache__/__init__.cpython-312.pyc differ diff --git a/gamification/__pycache__/__init__.cpython-313.pyc b/gamification/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..4e207371e Binary files /dev/null and b/gamification/__pycache__/__init__.cpython-313.pyc differ diff --git a/gamification/__pycache__/__init__.cpython-39.pyc b/gamification/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..d487b23d8 Binary files /dev/null and b/gamification/__pycache__/__init__.cpython-39.pyc differ diff --git a/gamification/__pycache__/admin.cpython-311.pyc b/gamification/__pycache__/admin.cpython-311.pyc new file mode 100644 index 000000000..6e9446649 Binary files /dev/null and b/gamification/__pycache__/admin.cpython-311.pyc differ diff --git a/gamification/__pycache__/admin.cpython-312.pyc b/gamification/__pycache__/admin.cpython-312.pyc new file mode 100644 index 000000000..cf1e85eb2 Binary files /dev/null and b/gamification/__pycache__/admin.cpython-312.pyc differ diff --git a/gamification/__pycache__/admin.cpython-313.pyc b/gamification/__pycache__/admin.cpython-313.pyc new file mode 100644 index 000000000..c438c018f Binary files /dev/null and b/gamification/__pycache__/admin.cpython-313.pyc differ diff --git a/gamification/__pycache__/admin.cpython-39.pyc b/gamification/__pycache__/admin.cpython-39.pyc new file mode 100644 index 000000000..df90ccf82 Binary files /dev/null and b/gamification/__pycache__/admin.cpython-39.pyc differ diff --git a/gamification/__pycache__/apps.cpython-311.pyc b/gamification/__pycache__/apps.cpython-311.pyc new file mode 100644 index 000000000..a16932d09 Binary files /dev/null and b/gamification/__pycache__/apps.cpython-311.pyc differ diff --git a/gamification/__pycache__/apps.cpython-312.pyc b/gamification/__pycache__/apps.cpython-312.pyc new file mode 100644 index 000000000..bf5461ca2 Binary files /dev/null and b/gamification/__pycache__/apps.cpython-312.pyc differ diff --git a/gamification/__pycache__/apps.cpython-313.pyc b/gamification/__pycache__/apps.cpython-313.pyc new file mode 100644 index 000000000..17ff170e3 Binary files /dev/null and b/gamification/__pycache__/apps.cpython-313.pyc differ diff --git a/gamification/__pycache__/apps.cpython-39.pyc b/gamification/__pycache__/apps.cpython-39.pyc new file mode 100644 index 000000000..acf56be97 Binary files /dev/null and b/gamification/__pycache__/apps.cpython-39.pyc differ diff --git a/gamification/__pycache__/models.cpython-311.pyc b/gamification/__pycache__/models.cpython-311.pyc new file mode 100644 index 000000000..7161c673f Binary files /dev/null and b/gamification/__pycache__/models.cpython-311.pyc differ diff --git a/gamification/__pycache__/models.cpython-312.pyc b/gamification/__pycache__/models.cpython-312.pyc new file mode 100644 index 000000000..fc6a66bd0 Binary files /dev/null and b/gamification/__pycache__/models.cpython-312.pyc differ diff --git a/gamification/__pycache__/models.cpython-313.pyc b/gamification/__pycache__/models.cpython-313.pyc new file mode 100644 index 000000000..c9fa1bdb5 Binary files /dev/null and b/gamification/__pycache__/models.cpython-313.pyc differ diff --git a/gamification/__pycache__/models.cpython-39.pyc b/gamification/__pycache__/models.cpython-39.pyc new file mode 100644 index 000000000..7ddca4001 Binary files /dev/null and b/gamification/__pycache__/models.cpython-39.pyc differ diff --git a/gamification/__pycache__/urls.cpython-311.pyc b/gamification/__pycache__/urls.cpython-311.pyc new file mode 100644 index 000000000..12f032d7a Binary files /dev/null and b/gamification/__pycache__/urls.cpython-311.pyc differ diff --git a/gamification/__pycache__/urls.cpython-312.pyc b/gamification/__pycache__/urls.cpython-312.pyc new file mode 100644 index 000000000..47e03d6f5 Binary files /dev/null and b/gamification/__pycache__/urls.cpython-312.pyc differ diff --git a/gamification/__pycache__/urls.cpython-313.pyc b/gamification/__pycache__/urls.cpython-313.pyc new file mode 100644 index 000000000..d45fa20c1 Binary files /dev/null and b/gamification/__pycache__/urls.cpython-313.pyc differ diff --git a/gamification/__pycache__/urls.cpython-39.pyc b/gamification/__pycache__/urls.cpython-39.pyc new file mode 100644 index 000000000..bb0faa02c Binary files /dev/null and b/gamification/__pycache__/urls.cpython-39.pyc differ diff --git a/gamification/__pycache__/views.cpython-311.pyc b/gamification/__pycache__/views.cpython-311.pyc new file mode 100644 index 000000000..c97a63203 Binary files /dev/null and b/gamification/__pycache__/views.cpython-311.pyc differ diff --git a/gamification/__pycache__/views.cpython-312.pyc b/gamification/__pycache__/views.cpython-312.pyc new file mode 100644 index 000000000..035943b64 Binary files /dev/null and b/gamification/__pycache__/views.cpython-312.pyc differ diff --git a/gamification/__pycache__/views.cpython-313.pyc b/gamification/__pycache__/views.cpython-313.pyc new file mode 100644 index 000000000..e5ac2b390 Binary files /dev/null and b/gamification/__pycache__/views.cpython-313.pyc differ diff --git a/gamification/__pycache__/views.cpython-39.pyc b/gamification/__pycache__/views.cpython-39.pyc new file mode 100644 index 000000000..027dd90d9 Binary files /dev/null and b/gamification/__pycache__/views.cpython-39.pyc differ diff --git a/gamification/admin.py b/gamification/admin.py new file mode 100644 index 000000000..c42703c30 --- /dev/null +++ b/gamification/admin.py @@ -0,0 +1,23 @@ +from django.contrib import admin +from django.utils.html import format_html +from .models import Quiz,Leaderboard,Flashcard,WordMatchQuestion + +class QuizAdmin(admin.ModelAdmin): + list_display = ('question', 'level', 'display_question_image') + search_fields = ('question',) + list_filter = ('level',) + + def display_question_image(self, obj): + if obj.question_image: + return format_html('', obj.question_image.url) + return "No Image" + display_question_image.short_description = "Question Image" + + +admin.site.register(Quiz, QuizAdmin) + +admin.site.register(WordMatchQuestion) + +admin.site.register(Flashcard) + +admin.site.register(Leaderboard) \ No newline at end of file diff --git a/gamification/apps.py b/gamification/apps.py new file mode 100644 index 000000000..13c512bdd --- /dev/null +++ b/gamification/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class GamificationConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'gamification' diff --git a/gamification/migrations/0001_initial.py b/gamification/migrations/0001_initial.py new file mode 100644 index 000000000..19a2564b0 --- /dev/null +++ b/gamification/migrations/0001_initial.py @@ -0,0 +1,41 @@ +# Generated by Django 5.1.7 on 2025-03-29 05:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Leaderboard', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('username', models.CharField(max_length=50)), + ('score', models.IntegerField()), + ('date', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='Quiz', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('question', models.TextField()), + ('question_image', models.ImageField(blank=True, null=True, upload_to='quiz_images/')), + ('option1', models.CharField(max_length=255)), + ('option1_image', models.ImageField(blank=True, null=True, upload_to='quiz_images/')), + ('option2', models.CharField(max_length=255)), + ('option2_image', models.ImageField(blank=True, null=True, upload_to='quiz_images/')), + ('option3', models.CharField(max_length=255)), + ('option3_image', models.ImageField(blank=True, null=True, upload_to='quiz_images/')), + ('option4', models.CharField(max_length=255)), + ('option4_image', models.ImageField(blank=True, null=True, upload_to='quiz_images/')), + ('correct_answer', models.CharField(max_length=255)), + ('level', models.CharField(choices=[('Beginner', 'Beginner'), ('Intermediate', 'Intermediate'), ('High', 'High Talented')], default='Beginner', max_length=20)), + ], + ), + ] diff --git a/gamification/migrations/0002_wordmatchquestion_leaderboard_game_type.py b/gamification/migrations/0002_wordmatchquestion_leaderboard_game_type.py new file mode 100644 index 000000000..85ce99012 --- /dev/null +++ b/gamification/migrations/0002_wordmatchquestion_leaderboard_game_type.py @@ -0,0 +1,26 @@ +# Generated by Django 5.1.7 on 2025-03-29 14:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gamification', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='WordMatchQuestion', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('word', models.CharField(max_length=255)), + ('image', models.ImageField(upload_to='word_match/')), + ], + ), + migrations.AddField( + model_name='leaderboard', + name='game_type', + field=models.CharField(choices=[('quiz', 'Quiz'), ('word_match', 'Word Match')], default='quiz', max_length=20), + ), + ] diff --git a/gamification/migrations/0003_flashcard_alter_wordmatchquestion_image.py b/gamification/migrations/0003_flashcard_alter_wordmatchquestion_image.py new file mode 100644 index 000000000..70d73750f --- /dev/null +++ b/gamification/migrations/0003_flashcard_alter_wordmatchquestion_image.py @@ -0,0 +1,29 @@ +# Generated by Django 5.1.7 on 2025-03-29 20:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gamification', '0002_wordmatchquestion_leaderboard_game_type'), + ] + + operations = [ + migrations.CreateModel( + name='Flashcard', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('sign_image', models.ImageField(upload_to='flashcards/')), + ('correct_word', models.CharField(max_length=255)), + ('option1', models.CharField(max_length=255)), + ('option2', models.CharField(max_length=255)), + ('option3', models.CharField(max_length=255)), + ], + ), + migrations.AlterField( + model_name='wordmatchquestion', + name='image', + field=models.ImageField(upload_to='word-match/'), + ), + ] diff --git a/gamification/migrations/0004_signtypinggame_alter_leaderboard_game_type_and_more.py b/gamification/migrations/0004_signtypinggame_alter_leaderboard_game_type_and_more.py new file mode 100644 index 000000000..697a6f58a --- /dev/null +++ b/gamification/migrations/0004_signtypinggame_alter_leaderboard_game_type_and_more.py @@ -0,0 +1,40 @@ +# Generated by Django 5.1.7 on 2025-03-30 06:45 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gamification', '0003_flashcard_alter_wordmatchquestion_image'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='SignTypingGame', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('username', models.CharField(max_length=100)), + ('score', models.IntegerField(default=0)), + ('time_taken', models.FloatField()), + ('date_played', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.AlterField( + model_name='leaderboard', + name='game_type', + field=models.CharField(choices=[('quiz', 'Quiz'), ('word_match', 'Word Match'), ('flashcard', 'Flashcard')], default='quiz', max_length=20), + ), + migrations.CreateModel( + name='FlashcardScore', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('score', models.IntegerField(default=0)), + ('timestamp', models.DateTimeField(auto_now_add=True)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/gamification/migrations/0005_alter_leaderboard_game_type.py b/gamification/migrations/0005_alter_leaderboard_game_type.py new file mode 100644 index 000000000..42ad7d570 --- /dev/null +++ b/gamification/migrations/0005_alter_leaderboard_game_type.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.7 on 2025-03-30 16:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gamification', '0004_signtypinggame_alter_leaderboard_game_type_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='leaderboard', + name='game_type', + field=models.CharField(choices=[('quiz', 'Quiz'), ('word_match', 'Word Match'), ('flashcard', 'Flashcard'), ('sign_typing_game', 'Sign Typing Game')], default='quiz', max_length=20), + ), + ] diff --git a/gamification/migrations/__init__.py b/gamification/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/gamification/migrations/__pycache__/0001_initial.cpython-311.pyc b/gamification/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 000000000..b3d3190d4 Binary files /dev/null and b/gamification/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/gamification/migrations/__pycache__/0001_initial.cpython-312.pyc b/gamification/migrations/__pycache__/0001_initial.cpython-312.pyc new file mode 100644 index 000000000..a90ec50e0 Binary files /dev/null and b/gamification/migrations/__pycache__/0001_initial.cpython-312.pyc differ diff --git a/gamification/migrations/__pycache__/0001_initial.cpython-313.pyc b/gamification/migrations/__pycache__/0001_initial.cpython-313.pyc new file mode 100644 index 000000000..322944678 Binary files /dev/null and b/gamification/migrations/__pycache__/0001_initial.cpython-313.pyc differ diff --git a/gamification/migrations/__pycache__/0001_initial.cpython-39.pyc b/gamification/migrations/__pycache__/0001_initial.cpython-39.pyc new file mode 100644 index 000000000..940890c4c Binary files /dev/null and b/gamification/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/gamification/migrations/__pycache__/0002_wordmatchquestion_leaderboard_game_type.cpython-311.pyc b/gamification/migrations/__pycache__/0002_wordmatchquestion_leaderboard_game_type.cpython-311.pyc new file mode 100644 index 000000000..0175b1709 Binary files /dev/null and b/gamification/migrations/__pycache__/0002_wordmatchquestion_leaderboard_game_type.cpython-311.pyc differ diff --git a/gamification/migrations/__pycache__/0002_wordmatchquestion_leaderboard_game_type.cpython-312.pyc b/gamification/migrations/__pycache__/0002_wordmatchquestion_leaderboard_game_type.cpython-312.pyc new file mode 100644 index 000000000..bf6327e4d Binary files /dev/null and b/gamification/migrations/__pycache__/0002_wordmatchquestion_leaderboard_game_type.cpython-312.pyc differ diff --git a/gamification/migrations/__pycache__/0002_wordmatchquestion_leaderboard_game_type.cpython-313.pyc b/gamification/migrations/__pycache__/0002_wordmatchquestion_leaderboard_game_type.cpython-313.pyc new file mode 100644 index 000000000..9c732b003 Binary files /dev/null and b/gamification/migrations/__pycache__/0002_wordmatchquestion_leaderboard_game_type.cpython-313.pyc differ diff --git a/gamification/migrations/__pycache__/0003_flashcard_alter_wordmatchquestion_image.cpython-311.pyc b/gamification/migrations/__pycache__/0003_flashcard_alter_wordmatchquestion_image.cpython-311.pyc new file mode 100644 index 000000000..7679e5a2f Binary files /dev/null and b/gamification/migrations/__pycache__/0003_flashcard_alter_wordmatchquestion_image.cpython-311.pyc differ diff --git a/gamification/migrations/__pycache__/0003_flashcard_alter_wordmatchquestion_image.cpython-312.pyc b/gamification/migrations/__pycache__/0003_flashcard_alter_wordmatchquestion_image.cpython-312.pyc new file mode 100644 index 000000000..965c7b193 Binary files /dev/null and b/gamification/migrations/__pycache__/0003_flashcard_alter_wordmatchquestion_image.cpython-312.pyc differ diff --git a/gamification/migrations/__pycache__/0003_flashcard_alter_wordmatchquestion_image.cpython-313.pyc b/gamification/migrations/__pycache__/0003_flashcard_alter_wordmatchquestion_image.cpython-313.pyc new file mode 100644 index 000000000..0e7b8ee33 Binary files /dev/null and b/gamification/migrations/__pycache__/0003_flashcard_alter_wordmatchquestion_image.cpython-313.pyc differ diff --git a/gamification/migrations/__pycache__/0004_signtypinggame_alter_leaderboard_game_type_and_more.cpython-311.pyc b/gamification/migrations/__pycache__/0004_signtypinggame_alter_leaderboard_game_type_and_more.cpython-311.pyc new file mode 100644 index 000000000..0ed58d0f4 Binary files /dev/null and b/gamification/migrations/__pycache__/0004_signtypinggame_alter_leaderboard_game_type_and_more.cpython-311.pyc differ diff --git a/gamification/migrations/__pycache__/0004_signtypinggame_alter_leaderboard_game_type_and_more.cpython-312.pyc b/gamification/migrations/__pycache__/0004_signtypinggame_alter_leaderboard_game_type_and_more.cpython-312.pyc new file mode 100644 index 000000000..01cb2ab00 Binary files /dev/null and b/gamification/migrations/__pycache__/0004_signtypinggame_alter_leaderboard_game_type_and_more.cpython-312.pyc differ diff --git a/gamification/migrations/__pycache__/0004_signtypinggame_alter_leaderboard_game_type_and_more.cpython-313.pyc b/gamification/migrations/__pycache__/0004_signtypinggame_alter_leaderboard_game_type_and_more.cpython-313.pyc new file mode 100644 index 000000000..15f02d4e5 Binary files /dev/null and b/gamification/migrations/__pycache__/0004_signtypinggame_alter_leaderboard_game_type_and_more.cpython-313.pyc differ diff --git a/gamification/migrations/__pycache__/0005_alter_leaderboard_game_type.cpython-311.pyc b/gamification/migrations/__pycache__/0005_alter_leaderboard_game_type.cpython-311.pyc new file mode 100644 index 000000000..a865a6044 Binary files /dev/null and b/gamification/migrations/__pycache__/0005_alter_leaderboard_game_type.cpython-311.pyc differ diff --git a/gamification/migrations/__pycache__/0005_alter_leaderboard_game_type.cpython-312.pyc b/gamification/migrations/__pycache__/0005_alter_leaderboard_game_type.cpython-312.pyc new file mode 100644 index 000000000..653b73ff4 Binary files /dev/null and b/gamification/migrations/__pycache__/0005_alter_leaderboard_game_type.cpython-312.pyc differ diff --git a/gamification/migrations/__pycache__/0005_alter_leaderboard_game_type.cpython-313.pyc b/gamification/migrations/__pycache__/0005_alter_leaderboard_game_type.cpython-313.pyc new file mode 100644 index 000000000..b7bddfe63 Binary files /dev/null and b/gamification/migrations/__pycache__/0005_alter_leaderboard_game_type.cpython-313.pyc differ diff --git a/gamification/migrations/__pycache__/__init__.cpython-311.pyc b/gamification/migrations/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..56d905cec Binary files /dev/null and b/gamification/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/gamification/migrations/__pycache__/__init__.cpython-312.pyc b/gamification/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..9e25c7d38 Binary files /dev/null and b/gamification/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/gamification/migrations/__pycache__/__init__.cpython-313.pyc b/gamification/migrations/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..f931c622d Binary files /dev/null and b/gamification/migrations/__pycache__/__init__.cpython-313.pyc differ diff --git a/gamification/migrations/__pycache__/__init__.cpython-39.pyc b/gamification/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..0b813ce54 Binary files /dev/null and b/gamification/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/gamification/models.py b/gamification/models.py new file mode 100644 index 000000000..5afbf6e84 --- /dev/null +++ b/gamification/models.py @@ -0,0 +1,79 @@ +from django.db import models +from django.conf import settings + +class Quiz(models.Model): + LEVEL_CHOICES = [ + ('Beginner', 'Beginner'), + ('Intermediate', 'Intermediate'), + ('High', 'High Talented'), + ] + + question = models.TextField() + question_image = models.ImageField(upload_to='quiz_images/', blank=True, null=True) + option1 = models.CharField(max_length=255) + option1_image = models.ImageField(upload_to='quiz_images/', blank=True, null=True) + option2 = models.CharField(max_length=255) + option2_image = models.ImageField(upload_to='quiz_images/', blank=True, null=True) + option3 = models.CharField(max_length=255) + option3_image = models.ImageField(upload_to='quiz_images/', blank=True, null=True) + option4 = models.CharField(max_length=255) + option4_image = models.ImageField(upload_to='quiz_images/', blank=True, null=True) + correct_answer = models.CharField(max_length=255) + level = models.CharField(max_length=20, choices=LEVEL_CHOICES, default='Beginner') + + def __str__(self): + return f"{self.level} - {self.question}" + + +class Leaderboard(models.Model): + GAME_CHOICES = [ + ('quiz', 'Quiz'), + ('word_match', 'Word Match'), + ('flashcard', 'Flashcard'), + ('sign_typing_game', 'Sign Typing Game'), # Added game type + ] + + username = models.CharField(max_length=50) + score = models.IntegerField() + game_type = models.CharField(max_length=20, choices=GAME_CHOICES, default='quiz') # New field + date = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return f"{self.username} - {self.score} ({self.game_type})" + + +class WordMatchQuestion(models.Model): + word = models.CharField(max_length=255) # The word to match + image = models.ImageField(upload_to="word-match/") # Sign language image + + def __str__(self): + return self.word + + +class Flashcard(models.Model): + sign_image = models.ImageField(upload_to="flashcards/") # Sign language image + correct_word = models.CharField(max_length=255) # The correct word + option1 = models.CharField(max_length=255) + option2 = models.CharField(max_length=255) + option3 = models.CharField(max_length=255) + + def __str__(self): + return self.correct_word + +class FlashcardScore(models.Model): + user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) # Track scores per user + score = models.IntegerField(default=0) + timestamp = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return f"{self.user.username} - {self.score} points" + + +class SignTypingGame(models.Model): + username = models.CharField(max_length=100) + score = models.IntegerField(default=0) + time_taken = models.FloatField() + date_played = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return f"{self.username} - {self.score}" diff --git a/gamification/templates/gamification/flashcard-game.html b/gamification/templates/gamification/flashcard-game.html new file mode 100644 index 000000000..dbab2ae50 --- /dev/null +++ b/gamification/templates/gamification/flashcard-game.html @@ -0,0 +1,168 @@ + + + + + + Sign Language Flashcards + + + +

Guess the Correct Word

+
+ {% for flashcard in flashcards %} + + {% endfor %} +
+

Score: 0

+

+ +
+ + +
+ + + + + + diff --git a/gamification/templates/gamification/flashcard-leaderboard.html b/gamification/templates/gamification/flashcard-leaderboard.html new file mode 100644 index 000000000..3c37bbe7c --- /dev/null +++ b/gamification/templates/gamification/flashcard-leaderboard.html @@ -0,0 +1,63 @@ + + + + + + Flashcard Leaderboard + + + +

🏆 Flashcard Leaderboard

+ + + + + + + {% for score in scores %} + + + + + + {% endfor %} +
RankPlayerScore
{{ forloop.counter }}{{ score.username }}{{ score.score }}
+ + diff --git a/gamification/templates/gamification/sign-typing-game-leaderboard.html b/gamification/templates/gamification/sign-typing-game-leaderboard.html new file mode 100644 index 000000000..5d46f72a2 --- /dev/null +++ b/gamification/templates/gamification/sign-typing-game-leaderboard.html @@ -0,0 +1,78 @@ + + + + + + Sign Typing Game Leaderboard + + + +

🏆 Sign Typing Game Leaderboard

+ + + + + + + + + + + {% for entry in scores %} + + + + + + + {% empty %} + + + + {% endfor %} + +
RankUsernameScoreDate
{{ forloop.counter }}{{ entry.username }}{{ entry.score }}{{ entry.date|date:"Y-m-d H:i" }}
No scores available yet.
+ Back to Game + + \ No newline at end of file diff --git a/gamification/templates/gamification/sign_typing_game.html b/gamification/templates/gamification/sign_typing_game.html new file mode 100644 index 000000000..fb5c361a5 --- /dev/null +++ b/gamification/templates/gamification/sign_typing_game.html @@ -0,0 +1,195 @@ + + + + + + + Sign Language Typing Game + + + + +

Sign Language Typing Game

+ Sign Image + + +
+

Score: 0

+

Time Taken: 0.00 seconds

+
+ +
+

Time Left: 30 seconds

+
+ + + +
+ +
+ + \ No newline at end of file diff --git a/gamification/templates/gamification/word-match-leaderboard.html b/gamification/templates/gamification/word-match-leaderboard.html new file mode 100644 index 000000000..acbbc1dbf --- /dev/null +++ b/gamification/templates/gamification/word-match-leaderboard.html @@ -0,0 +1,110 @@ + + + + + + Word Match Leaderboard + + + +
+

🏆 Word Match Leaderboard

+ + + + + +
PlayerScore
+ +
+ + + + \ No newline at end of file diff --git a/gamification/templates/gamification/word-match.html b/gamification/templates/gamification/word-match.html new file mode 100644 index 000000000..875cdb544 --- /dev/null +++ b/gamification/templates/gamification/word-match.html @@ -0,0 +1,173 @@ + + + + + + Word Matching Game + + + +

Match the Words with Their Signs

+ +
+
+ {% for question in questions %} +

{{ question.word }}

+ {% endfor %} +
+ +
+ {% for question in questions %} +
+ {{ question.word }} Sign +
+ {% endfor %} +
+
+

Score: 0

+ + +

+ + + + \ No newline at end of file diff --git a/gamification/templates/leaderboard.html b/gamification/templates/leaderboard.html new file mode 100644 index 000000000..3b78f8299 --- /dev/null +++ b/gamification/templates/leaderboard.html @@ -0,0 +1,63 @@ + + + + + + Leaderboard + + + +
+

🏆 Quiz Leaderboard

+ + + + + +
PlayerScore
+ + +
+ + + \ No newline at end of file diff --git a/gamification/templates/quiz.html b/gamification/templates/quiz.html new file mode 100644 index 000000000..cc91174a3 --- /dev/null +++ b/gamification/templates/quiz.html @@ -0,0 +1,230 @@ + + + + + + SignMaster Quiz + + + + +

SignMaster Quiz

+ +
+ + + + +
+ +
+

Time Left: 15s

+

Select a level to start the quiz

+ +
+

+ +
+ + + +

Score: 0

+ + + + + \ No newline at end of file diff --git a/gamification/tests.py b/gamification/tests.py new file mode 100644 index 000000000..7ce503c2d --- /dev/null +++ b/gamification/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/gamification/urls.py b/gamification/urls.py new file mode 100644 index 000000000..0c51ba666 --- /dev/null +++ b/gamification/urls.py @@ -0,0 +1,20 @@ +from django.urls import path +from .views import get_quiz,save_score + +from . import views +urlpatterns = [ + path('get_quiz//', get_quiz, name='get_quiz'), + path('save_score/', save_score, name='save_score'), + path('get_leaderboard/', views.get_leaderboard, name='get_leaderboard'), + path('leaderboard/', views.leaderboard, name='leaderboard'), + path('quiz/', views.quiz, name='quiz'), + path("word-match/", views.word_match_game, name="word_match"), + path("word-match-leaderboard/", views.word_match_leaderboard, name="word_match_leaderboard"), + path("flashcards/", views.flashcard_game, name="flashcard-game"), + path("save_flashcard_score/", views.save_flashcard_score, name="save_flashcard_score"), + path("flashcard-leaderboard/", views.flashcard_leaderboard, name="flashcard_leaderboard"), + path("sign-typing-game/", views.sign_typing_game, name="sign_typing_game"), + path('get-new-question/', views.get_new_question, name='get_new_question'), + path("sign-typing-game-leaderboard/", views.sign_typing_game_leaderboard, name="sign-typing-game-leaderboard"), +] + diff --git a/gamification/views.py b/gamification/views.py new file mode 100644 index 000000000..01189b36c --- /dev/null +++ b/gamification/views.py @@ -0,0 +1,155 @@ +from django.http import JsonResponse +from .models import Quiz,Leaderboard,WordMatchQuestion,Flashcard +from django.shortcuts import render +from django.views.decorators.csrf import csrf_exempt +import json +import random +import os +from django.conf import settings + + +def get_quiz(request, level): + quizzes = Quiz.objects.filter(level=level).order_by('?') # Fetch all questions for the level + if not quizzes.exists(): + return JsonResponse({"error": "No quizzes available for this level"}, status=404) + + data = [] + for quiz in quizzes: + data.append({ + "question": quiz.question, + "question_image": quiz.question_image.url if quiz.question_image else None, + "options": [ + {"text": quiz.option1, "image": quiz.option1_image.url if quiz.option1_image else None}, + {"text": quiz.option2, "image": quiz.option2_image.url if quiz.option2_image else None}, + {"text": quiz.option3, "image": quiz.option3_image.url if quiz.option3_image else None}, + {"text": quiz.option4, "image": quiz.option4_image.url if quiz.option4_image else None}, + ], + "correct_answer": quiz.correct_answer + }) + + return JsonResponse({"quizzes": data}) + + +def quiz(request): + return render(request, 'quiz.html') # Render the quiz.html template + +@csrf_exempt +def save_score(request): + if request.method == "POST": + try: + data = json.loads(request.body) + username = data.get("username", "Guest") + score = data.get("score") + game_type = data.get("game_type", "quiz") + + if username and score is not None: + Leaderboard.objects.create(username=username, score=score, game_type=game_type) + return JsonResponse({"message": "Score saved successfully"}, status=201) + else: + return JsonResponse({"error": "Invalid data"}, status=400) + except Exception as e: + return JsonResponse({"error": str(e)}, status=500) + + return JsonResponse({"error": "Invalid request"}, status=400) + + +def get_leaderboard(request): + game_type = request.GET.get("game_type", "quiz") # Default to 'quiz' + scores = Leaderboard.objects.filter(game_type=game_type).order_by('-score', 'date') + data = [{"username": entry.username, "score": entry.score} for entry in scores] + return JsonResponse({"leaderboard": data}) + +def leaderboard(request): + scores = Leaderboard.objects.order_by('-score') # Order by highest score + return render(request, 'leaderboard.html', {'scores': scores}) + +def word_match_game(request): + questions = WordMatchQuestion.objects.all() # Fetch questions from DB + return render(request, "gamification/word-match.html", {"questions": questions}) + + +def word_match_leaderboard(request): + return render(request, "gamification/word-match-leaderboard.html") + +def flashcard_game(request): + flashcards = Flashcard.objects.all() + + for flashcard in flashcards: + # Ensure the correct answer and wrong options are unique + choices = list(set([flashcard.option1, flashcard.option2, flashcard.option3, flashcard.correct_word])) + random.shuffle(choices) # Shuffle options randomly + flashcard.shuffled_options = choices # Attach shuffled options to the flashcard object + + return render(request, "gamification/flashcard-game.html", {"flashcards": flashcards}) + + +@csrf_exempt +def save_flashcard_score(request): + if request.method == "POST": + try: + data = json.loads(request.body) + username = data.get("username", "Guest") + score = data.get("score") + + if username and score is not None: + Leaderboard.objects.create(username=username, score=score, game_type="flashcard") + return JsonResponse({"message": "Flashcard score saved successfully"}, status=201) + else: + return JsonResponse({"error": "Invalid data"}, status=400) + except Exception as e: + return JsonResponse({"error": str(e)}, status=500) + + return JsonResponse({"error": "Invalid request"}, status=400) + + +def flashcard_leaderboard(request): + scores = Leaderboard.objects.filter(game_type="flashcard").order_by('-score', 'date') + return render(request, "gamification/flashcard-leaderboard.html", {"scores": scores}) + + +def sign_typing_game(request): + # Path to the folder containing sign images + image_folder = os.path.join(settings.MEDIA_ROOT, "quiz_images") + images = [img for img in os.listdir(image_folder) if img.endswith(".webp")] + + if images: + # Randomly select an image + random_image = random.choice(images) + correct_letter = random_image.split("-")[1].upper() # Extract the letter after "letter-" + + # Return JSON response for AJAX requests + if request.headers.get('x-requested-with') == 'XMLHttpRequest': + return JsonResponse({ + "image_url": f"/media/quiz_images/{random_image}", + "correct_letter": correct_letter + }) + + # Render the HTML template for initial page load + return render(request, "gamification/sign_typing_game.html", { + "image_url": f"/media/quiz_images/{random_image}", + "correct_letter": correct_letter + }) + else: + return JsonResponse({"error": "No images found"}, status=404) + +def get_new_question(request): + # Assuming images are stored in 'media/quiz_images/' + image_folder = "media/quiz_images/" + images = [f for f in os.listdir(image_folder) if f.endswith(".webp")] + + if not images: + return JsonResponse({"error": "No images found"}, status=404) + + # Pick a random image + new_image = random.choice(images) + correct_letter = new_image.split("-")[1].upper() # Extract letter from filename + + return JsonResponse({ + "image_url": f"/{image_folder}{new_image}", + "correct_letter": correct_letter + }) + +def sign_typing_game_leaderboard(request): + # Filter scores for the "sign_typing_game" game type + scores = Leaderboard.objects.filter(game_type="sign_typing_game").order_by('-score', 'date') + return render(request, "gamification/sign-typing-game-leaderboard.html", {"scores": scores}) \ No newline at end of file diff --git a/manage.py b/manage.py new file mode 100644 index 000000000..eb162794b --- /dev/null +++ b/manage.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SignMaster.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() + + + +# import sqlite3 + +# # Connect to SQLite database +# conn = sqlite3.connect('db.sqlite3') +# cursor = conn.cursor() + +# # Insert values into asl_signs table +# cursor.execute(""" +# INSERT INTO asl_signs (character, image_path) VALUES +# ('A', 'static/images/A.png'), +# ('B', 'static/images/B.png'), +# ('C', 'static/images/C.png'), +# ('D', 'static/images/D.png'), +# ('E', 'static/images/E.png'), +# ('F', 'static/images/F.png'), +# ('G', 'static/images/G.png'), +# ('H', 'static/images/H.png'), +# ('I', 'static/images/I.png'), +# ('J', 'static/images/J.png'), +# ('K', 'static/images/K.png'), +# ('L', 'static/images/L.png'), +# ('M', 'static/images/M.png'), +# ('N', 'static/images/N.png'), +# ('O', 'static/images/O.png'), +# ('P', 'static/images/P.png'), +# ('Q', 'static/images/Q.png'), +# ('R', 'static/images/R.png'), +# ('S', 'static/images/S.png'), +# ('T', 'static/images/T.png'), +# ('U', 'static/images/U.png'), +# ('V', 'static/images/V.png'), +# ('W', 'static/images/W.png'), +# ('X', 'static/images/X.png'), +# ('Y', 'static/images/Y.png'), +# ('Z', 'static/images/Z.png'), +# ('0', 'static/images/0.png'), +# ('1', 'static/images/1.png'), +# ('2', 'static/images/2.png'), +# ('3', 'static/images/3.png'), +# ('4', 'static/images/4.png'), +# ('5', 'static/images/5.png'), +# ('6', 'static/images/6.png'), +# ('7', 'static/images/7.png'), +# ('8', 'static/images/8.png'), +# ('9', 'static/images/9.png'), +# (' ', 'static/images/space.png') -- ✅ No trailing comma here! +# """) + +# # Commit the changes +# conn.commit() + +# # Close the connection +# conn.close() diff --git a/media/asl_output.mp4 b/media/asl_output.mp4 new file mode 100644 index 000000000..3a743001f Binary files /dev/null and b/media/asl_output.mp4 differ diff --git a/media/flashcards/GoodBye_download.png b/media/flashcards/GoodBye_download.png new file mode 100644 index 000000000..ba821d607 Binary files /dev/null and b/media/flashcards/GoodBye_download.png differ diff --git a/media/flashcards/eat_download.png b/media/flashcards/eat_download.png new file mode 100644 index 000000000..c1259949b Binary files /dev/null and b/media/flashcards/eat_download.png differ diff --git a/media/flashcards/grapes_download.png b/media/flashcards/grapes_download.png new file mode 100644 index 000000000..85a9e8500 Binary files /dev/null and b/media/flashcards/grapes_download.png differ diff --git a/media/flashcards/hello.webp b/media/flashcards/hello.webp new file mode 100644 index 000000000..fb4010507 Binary files /dev/null and b/media/flashcards/hello.webp differ diff --git a/media/flashcards/milk.png b/media/flashcards/milk.png new file mode 100644 index 000000000..13b8a0fc5 Binary files /dev/null and b/media/flashcards/milk.png differ diff --git a/media/flashcards/more.png b/media/flashcards/more.png new file mode 100644 index 000000000..273cfc13e Binary files /dev/null and b/media/flashcards/more.png differ diff --git a/media/flashcards/nice_images.png b/media/flashcards/nice_images.png new file mode 100644 index 000000000..c851e439e Binary files /dev/null and b/media/flashcards/nice_images.png differ diff --git a/media/flashcards/play_download.png b/media/flashcards/play_download.png new file mode 100644 index 000000000..89d9df64b Binary files /dev/null and b/media/flashcards/play_download.png differ diff --git a/media/flashcards/totmoto_download.png b/media/flashcards/totmoto_download.png new file mode 100644 index 000000000..69058f49f Binary files /dev/null and b/media/flashcards/totmoto_download.png differ diff --git a/media/quiz_images/10_images.jpeg b/media/quiz_images/10_images.jpeg new file mode 100644 index 000000000..cc556ae0e Binary files /dev/null and b/media/quiz_images/10_images.jpeg differ diff --git a/media/quiz_images/10_images_Xiy9aNq.jpeg b/media/quiz_images/10_images_Xiy9aNq.jpeg new file mode 100644 index 000000000..cc556ae0e Binary files /dev/null and b/media/quiz_images/10_images_Xiy9aNq.jpeg differ diff --git a/media/quiz_images/1_9PaU8eUtRDp9njqVpSFDKw.jpg b/media/quiz_images/1_9PaU8eUtRDp9njqVpSFDKw.jpg new file mode 100644 index 000000000..b701fa82f Binary files /dev/null and b/media/quiz_images/1_9PaU8eUtRDp9njqVpSFDKw.jpg differ diff --git a/media/quiz_images/1_9PaU8eUtRDp9njqVpSFDKw_qwPnNFk.jpg b/media/quiz_images/1_9PaU8eUtRDp9njqVpSFDKw_qwPnNFk.jpg new file mode 100644 index 000000000..b701fa82f Binary files /dev/null and b/media/quiz_images/1_9PaU8eUtRDp9njqVpSFDKw_qwPnNFk.jpg differ diff --git a/media/quiz_images/2_images.jpeg b/media/quiz_images/2_images.jpeg new file mode 100644 index 000000000..0283ef26a Binary files /dev/null and b/media/quiz_images/2_images.jpeg differ diff --git a/media/quiz_images/362025-isl.jpg b/media/quiz_images/362025-isl.jpg new file mode 100644 index 000000000..535aa71b8 Binary files /dev/null and b/media/quiz_images/362025-isl.jpg differ diff --git a/media/quiz_images/3_download.jpeg b/media/quiz_images/3_download.jpeg new file mode 100644 index 000000000..5fa85e1de Binary files /dev/null and b/media/quiz_images/3_download.jpeg differ diff --git a/media/quiz_images/4_images.jpeg b/media/quiz_images/4_images.jpeg new file mode 100644 index 000000000..b90df6fb4 Binary files /dev/null and b/media/quiz_images/4_images.jpeg differ diff --git a/media/quiz_images/4_images_3Sa1qOO.jpeg b/media/quiz_images/4_images_3Sa1qOO.jpeg new file mode 100644 index 000000000..b90df6fb4 Binary files /dev/null and b/media/quiz_images/4_images_3Sa1qOO.jpeg differ diff --git a/media/quiz_images/4_images_yZQBIQe.jpeg b/media/quiz_images/4_images_yZQBIQe.jpeg new file mode 100644 index 000000000..b90df6fb4 Binary files /dev/null and b/media/quiz_images/4_images_yZQBIQe.jpeg differ diff --git a/media/quiz_images/6_download.jpeg b/media/quiz_images/6_download.jpeg new file mode 100644 index 000000000..22af9c749 Binary files /dev/null and b/media/quiz_images/6_download.jpeg differ diff --git a/media/quiz_images/6_download_eZCxlGc.jpeg b/media/quiz_images/6_download_eZCxlGc.jpeg new file mode 100644 index 000000000..22af9c749 Binary files /dev/null and b/media/quiz_images/6_download_eZCxlGc.jpeg differ diff --git a/media/quiz_images/7_images.jpeg b/media/quiz_images/7_images.jpeg new file mode 100644 index 000000000..4ff40ccb9 Binary files /dev/null and b/media/quiz_images/7_images.jpeg differ diff --git a/media/quiz_images/7_images_e5cslp2.jpeg b/media/quiz_images/7_images_e5cslp2.jpeg new file mode 100644 index 000000000..4ff40ccb9 Binary files /dev/null and b/media/quiz_images/7_images_e5cslp2.jpeg differ diff --git a/media/quiz_images/7_images_soXss0z.jpeg b/media/quiz_images/7_images_soXss0z.jpeg new file mode 100644 index 000000000..4ff40ccb9 Binary files /dev/null and b/media/quiz_images/7_images_soXss0z.jpeg differ diff --git a/media/quiz_images/8_download.jpeg b/media/quiz_images/8_download.jpeg new file mode 100644 index 000000000..aeb99085f Binary files /dev/null and b/media/quiz_images/8_download.jpeg differ diff --git a/media/quiz_images/8_download_Y5jtDzc.jpeg b/media/quiz_images/8_download_Y5jtDzc.jpeg new file mode 100644 index 000000000..aeb99085f Binary files /dev/null and b/media/quiz_images/8_download_Y5jtDzc.jpeg differ diff --git a/media/quiz_images/9_evrcSLHsxRQn6bxqG0ROkA.jpg b/media/quiz_images/9_evrcSLHsxRQn6bxqG0ROkA.jpg new file mode 100644 index 000000000..99b9affe9 Binary files /dev/null and b/media/quiz_images/9_evrcSLHsxRQn6bxqG0ROkA.jpg differ diff --git a/media/quiz_images/9_evrcSLHsxRQn6bxqG0ROkA_XPt7Nfv.jpg b/media/quiz_images/9_evrcSLHsxRQn6bxqG0ROkA_XPt7Nfv.jpg new file mode 100644 index 000000000..99b9affe9 Binary files /dev/null and b/media/quiz_images/9_evrcSLHsxRQn6bxqG0ROkA_XPt7Nfv.jpg differ diff --git a/media/quiz_images/ASL1_images.jpeg b/media/quiz_images/ASL1_images.jpeg new file mode 100644 index 000000000..526c76d50 Binary files /dev/null and b/media/quiz_images/ASL1_images.jpeg differ diff --git a/media/quiz_images/ASL1_images_UEZnM52.jpeg b/media/quiz_images/ASL1_images_UEZnM52.jpeg new file mode 100644 index 000000000..526c76d50 Binary files /dev/null and b/media/quiz_images/ASL1_images_UEZnM52.jpeg differ diff --git a/media/quiz_images/ASL1_images_Wf5RS03.jpeg b/media/quiz_images/ASL1_images_Wf5RS03.jpeg new file mode 100644 index 000000000..526c76d50 Binary files /dev/null and b/media/quiz_images/ASL1_images_Wf5RS03.jpeg differ diff --git a/media/quiz_images/ASL1_images_XE08VFs.jpeg b/media/quiz_images/ASL1_images_XE08VFs.jpeg new file mode 100644 index 000000000..526c76d50 Binary files /dev/null and b/media/quiz_images/ASL1_images_XE08VFs.jpeg differ diff --git a/media/quiz_images/ASL1_images_dWTsYhO.jpeg b/media/quiz_images/ASL1_images_dWTsYhO.jpeg new file mode 100644 index 000000000..526c76d50 Binary files /dev/null and b/media/quiz_images/ASL1_images_dWTsYhO.jpeg differ diff --git a/media/quiz_images/A_0.jpg b/media/quiz_images/A_0.jpg new file mode 100644 index 000000000..c971a292c Binary files /dev/null and b/media/quiz_images/A_0.jpg differ diff --git a/media/quiz_images/HELLO1_download.jpeg b/media/quiz_images/HELLO1_download.jpeg new file mode 100644 index 000000000..baccaac35 Binary files /dev/null and b/media/quiz_images/HELLO1_download.jpeg differ diff --git a/media/quiz_images/HELLO1_download_28RPy6C.jpeg b/media/quiz_images/HELLO1_download_28RPy6C.jpeg new file mode 100644 index 000000000..baccaac35 Binary files /dev/null and b/media/quiz_images/HELLO1_download_28RPy6C.jpeg differ diff --git a/media/quiz_images/HELLO1_download_dgXx6Fr.jpeg b/media/quiz_images/HELLO1_download_dgXx6Fr.jpeg new file mode 100644 index 000000000..baccaac35 Binary files /dev/null and b/media/quiz_images/HELLO1_download_dgXx6Fr.jpeg differ diff --git a/media/quiz_images/HELLO1_download_inTRJHV.jpeg b/media/quiz_images/HELLO1_download_inTRJHV.jpeg new file mode 100644 index 000000000..baccaac35 Binary files /dev/null and b/media/quiz_images/HELLO1_download_inTRJHV.jpeg differ diff --git a/media/quiz_images/LOVE1_download.jpeg b/media/quiz_images/LOVE1_download.jpeg new file mode 100644 index 000000000..4ca9009db Binary files /dev/null and b/media/quiz_images/LOVE1_download.jpeg differ diff --git a/media/quiz_images/LOVE1_download_130sNad.jpeg b/media/quiz_images/LOVE1_download_130sNad.jpeg new file mode 100644 index 000000000..4ca9009db Binary files /dev/null and b/media/quiz_images/LOVE1_download_130sNad.jpeg differ diff --git a/media/quiz_images/LOVE1_download_TChraXj.jpeg b/media/quiz_images/LOVE1_download_TChraXj.jpeg new file mode 100644 index 000000000..4ca9009db Binary files /dev/null and b/media/quiz_images/LOVE1_download_TChraXj.jpeg differ diff --git a/media/quiz_images/LOVE1_download_dcqjxov.jpeg b/media/quiz_images/LOVE1_download_dcqjxov.jpeg new file mode 100644 index 000000000..4ca9009db Binary files /dev/null and b/media/quiz_images/LOVE1_download_dcqjxov.jpeg differ diff --git a/media/quiz_images/M.jpg b/media/quiz_images/M.jpg new file mode 100644 index 000000000..449f0939a Binary files /dev/null and b/media/quiz_images/M.jpg differ diff --git a/media/quiz_images/WELCOM1_download.jpeg b/media/quiz_images/WELCOM1_download.jpeg new file mode 100644 index 000000000..c98236e50 Binary files /dev/null and b/media/quiz_images/WELCOM1_download.jpeg differ diff --git a/media/quiz_images/WELCOM1_download_LtKBEBG.jpeg b/media/quiz_images/WELCOM1_download_LtKBEBG.jpeg new file mode 100644 index 000000000..c98236e50 Binary files /dev/null and b/media/quiz_images/WELCOM1_download_LtKBEBG.jpeg differ diff --git a/media/quiz_images/WELCOM1_download_d33kZDY.jpeg b/media/quiz_images/WELCOM1_download_d33kZDY.jpeg new file mode 100644 index 000000000..c98236e50 Binary files /dev/null and b/media/quiz_images/WELCOM1_download_d33kZDY.jpeg differ diff --git a/media/quiz_images/WELCOM1_download_hNu8BWE.jpeg b/media/quiz_images/WELCOM1_download_hNu8BWE.jpeg new file mode 100644 index 000000000..c98236e50 Binary files /dev/null and b/media/quiz_images/WELCOM1_download_hNu8BWE.jpeg differ diff --git a/media/quiz_images/WELCOM1_download_mqzISQ3.jpeg b/media/quiz_images/WELCOM1_download_mqzISQ3.jpeg new file mode 100644 index 000000000..c98236e50 Binary files /dev/null and b/media/quiz_images/WELCOM1_download_mqzISQ3.jpeg differ diff --git a/media/quiz_images/apple_download.png b/media/quiz_images/apple_download.png new file mode 100644 index 000000000..05dfe3ad5 Binary files /dev/null and b/media/quiz_images/apple_download.png differ diff --git a/media/quiz_images/cow_download.png b/media/quiz_images/cow_download.png new file mode 100644 index 000000000..7d02accac Binary files /dev/null and b/media/quiz_images/cow_download.png differ diff --git a/media/quiz_images/letter-A-American-Sign-Language-ASL.webp b/media/quiz_images/letter-A-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..359b851c5 Binary files /dev/null and b/media/quiz_images/letter-A-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-A-American-Sign-Language-ASL_myIOwf7.webp b/media/quiz_images/letter-A-American-Sign-Language-ASL_myIOwf7.webp new file mode 100644 index 000000000..359b851c5 Binary files /dev/null and b/media/quiz_images/letter-A-American-Sign-Language-ASL_myIOwf7.webp differ diff --git a/media/quiz_images/letter-B-American-Sign-Language-ASL.webp b/media/quiz_images/letter-B-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..7610e9dac Binary files /dev/null and b/media/quiz_images/letter-B-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-B-American-Sign-Language-ASL_LLdBuz0.webp b/media/quiz_images/letter-B-American-Sign-Language-ASL_LLdBuz0.webp new file mode 100644 index 000000000..7610e9dac Binary files /dev/null and b/media/quiz_images/letter-B-American-Sign-Language-ASL_LLdBuz0.webp differ diff --git a/media/quiz_images/letter-B-American-Sign-Language-ASL_NbfvR3N.webp b/media/quiz_images/letter-B-American-Sign-Language-ASL_NbfvR3N.webp new file mode 100644 index 000000000..7610e9dac Binary files /dev/null and b/media/quiz_images/letter-B-American-Sign-Language-ASL_NbfvR3N.webp differ diff --git a/media/quiz_images/letter-C-American-Sign-Language-ASL.webp b/media/quiz_images/letter-C-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..8e259c2b6 Binary files /dev/null and b/media/quiz_images/letter-C-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-D-American-Sign-Language-ASL.webp b/media/quiz_images/letter-D-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..2edc1bda8 Binary files /dev/null and b/media/quiz_images/letter-D-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-D-American-Sign-Language-ASL_En1ab3Y.webp b/media/quiz_images/letter-D-American-Sign-Language-ASL_En1ab3Y.webp new file mode 100644 index 000000000..2edc1bda8 Binary files /dev/null and b/media/quiz_images/letter-D-American-Sign-Language-ASL_En1ab3Y.webp differ diff --git a/media/quiz_images/letter-E-American-Sign-Language-ASL.webp b/media/quiz_images/letter-E-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..36ab9f043 Binary files /dev/null and b/media/quiz_images/letter-E-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-E-American-Sign-Language-ASL_LhFfe6B.webp b/media/quiz_images/letter-E-American-Sign-Language-ASL_LhFfe6B.webp new file mode 100644 index 000000000..36ab9f043 Binary files /dev/null and b/media/quiz_images/letter-E-American-Sign-Language-ASL_LhFfe6B.webp differ diff --git a/media/quiz_images/letter-F-American-Sign-Language-ASL.webp b/media/quiz_images/letter-F-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..33e107aaf Binary files /dev/null and b/media/quiz_images/letter-F-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-F-American-Sign-Language-ASL_3np2gcz.webp b/media/quiz_images/letter-F-American-Sign-Language-ASL_3np2gcz.webp new file mode 100644 index 000000000..33e107aaf Binary files /dev/null and b/media/quiz_images/letter-F-American-Sign-Language-ASL_3np2gcz.webp differ diff --git a/media/quiz_images/letter-G-American-Sign-Language-ASL.webp b/media/quiz_images/letter-G-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..c0b0cc9f8 Binary files /dev/null and b/media/quiz_images/letter-G-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-H-American-Sign-Language-ASL.webp b/media/quiz_images/letter-H-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..28ee21402 Binary files /dev/null and b/media/quiz_images/letter-H-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-H-American-Sign-Language-ASL_KIUjXYq.webp b/media/quiz_images/letter-H-American-Sign-Language-ASL_KIUjXYq.webp new file mode 100644 index 000000000..28ee21402 Binary files /dev/null and b/media/quiz_images/letter-H-American-Sign-Language-ASL_KIUjXYq.webp differ diff --git a/media/quiz_images/letter-H-American-Sign-Language-ASL_SAwJduJ.webp b/media/quiz_images/letter-H-American-Sign-Language-ASL_SAwJduJ.webp new file mode 100644 index 000000000..28ee21402 Binary files /dev/null and b/media/quiz_images/letter-H-American-Sign-Language-ASL_SAwJduJ.webp differ diff --git a/media/quiz_images/letter-I-American-Sign-Language-ASL.webp b/media/quiz_images/letter-I-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..f5ba6e8a0 Binary files /dev/null and b/media/quiz_images/letter-I-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-J-American-Sign-Language-ASL.webp b/media/quiz_images/letter-J-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..6e18fb242 Binary files /dev/null and b/media/quiz_images/letter-J-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-K-American-Sign-Language-ASL.webp b/media/quiz_images/letter-K-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..c7e08374e Binary files /dev/null and b/media/quiz_images/letter-K-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-K-American-Sign-Language-ASL_3xN0FFf.webp b/media/quiz_images/letter-K-American-Sign-Language-ASL_3xN0FFf.webp new file mode 100644 index 000000000..c7e08374e Binary files /dev/null and b/media/quiz_images/letter-K-American-Sign-Language-ASL_3xN0FFf.webp differ diff --git a/media/quiz_images/letter-K-American-Sign-Language-ASL_ateMQ3L.webp b/media/quiz_images/letter-K-American-Sign-Language-ASL_ateMQ3L.webp new file mode 100644 index 000000000..c7e08374e Binary files /dev/null and b/media/quiz_images/letter-K-American-Sign-Language-ASL_ateMQ3L.webp differ diff --git a/media/quiz_images/letter-L-American-Sign-Language-ASL.webp b/media/quiz_images/letter-L-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..cd78b3d28 Binary files /dev/null and b/media/quiz_images/letter-L-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-M-American-Sign-Language-ASL.webp b/media/quiz_images/letter-M-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..3a4dfcfe1 Binary files /dev/null and b/media/quiz_images/letter-M-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-N-American-Sign-Language-ASL.webp b/media/quiz_images/letter-N-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..c77474a61 Binary files /dev/null and b/media/quiz_images/letter-N-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-O-American-Sign-Language-ASL.webp b/media/quiz_images/letter-O-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..89fcc46d2 Binary files /dev/null and b/media/quiz_images/letter-O-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-P-American-Sign-Language-ASL.webp b/media/quiz_images/letter-P-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..b9dbe88ba Binary files /dev/null and b/media/quiz_images/letter-P-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-P-American-Sign-Language-ASL_6cA090P.webp b/media/quiz_images/letter-P-American-Sign-Language-ASL_6cA090P.webp new file mode 100644 index 000000000..b9dbe88ba Binary files /dev/null and b/media/quiz_images/letter-P-American-Sign-Language-ASL_6cA090P.webp differ diff --git a/media/quiz_images/letter-Q-American-Sign-Language-ASL.webp b/media/quiz_images/letter-Q-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..1a4df5fbe Binary files /dev/null and b/media/quiz_images/letter-Q-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-Q-American-Sign-Language-ASL_00Y32te.webp b/media/quiz_images/letter-Q-American-Sign-Language-ASL_00Y32te.webp new file mode 100644 index 000000000..1a4df5fbe Binary files /dev/null and b/media/quiz_images/letter-Q-American-Sign-Language-ASL_00Y32te.webp differ diff --git a/media/quiz_images/letter-R-American-Sign-Language-ASL.webp b/media/quiz_images/letter-R-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..f1ee5a87f Binary files /dev/null and b/media/quiz_images/letter-R-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-R-American-Sign-Language-ASL_YdXAAfm.webp b/media/quiz_images/letter-R-American-Sign-Language-ASL_YdXAAfm.webp new file mode 100644 index 000000000..f1ee5a87f Binary files /dev/null and b/media/quiz_images/letter-R-American-Sign-Language-ASL_YdXAAfm.webp differ diff --git a/media/quiz_images/letter-R-American-Sign-Language-ASL_gSP6O2E.webp b/media/quiz_images/letter-R-American-Sign-Language-ASL_gSP6O2E.webp new file mode 100644 index 000000000..f1ee5a87f Binary files /dev/null and b/media/quiz_images/letter-R-American-Sign-Language-ASL_gSP6O2E.webp differ diff --git a/media/quiz_images/letter-R-American-Sign-Language-ASL_pwFcwYk.webp b/media/quiz_images/letter-R-American-Sign-Language-ASL_pwFcwYk.webp new file mode 100644 index 000000000..f1ee5a87f Binary files /dev/null and b/media/quiz_images/letter-R-American-Sign-Language-ASL_pwFcwYk.webp differ diff --git a/media/quiz_images/letter-S-American-Sign-Language-ASL.webp b/media/quiz_images/letter-S-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..6bd330a08 Binary files /dev/null and b/media/quiz_images/letter-S-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-T-American-Sign-Language-ASL.webp b/media/quiz_images/letter-T-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..e20f51e7b Binary files /dev/null and b/media/quiz_images/letter-T-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-U-American-Sign-Language-ASL.webp b/media/quiz_images/letter-U-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..f7fd25cb5 Binary files /dev/null and b/media/quiz_images/letter-U-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-V-American-Sign-Language-ASL.webp b/media/quiz_images/letter-V-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..6f940a26f Binary files /dev/null and b/media/quiz_images/letter-V-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-V-American-Sign-Language-ASL_hb7QD5Y.webp b/media/quiz_images/letter-V-American-Sign-Language-ASL_hb7QD5Y.webp new file mode 100644 index 000000000..6f940a26f Binary files /dev/null and b/media/quiz_images/letter-V-American-Sign-Language-ASL_hb7QD5Y.webp differ diff --git a/media/quiz_images/letter-W-American-Sign-Language-ASL.webp b/media/quiz_images/letter-W-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..69c525f06 Binary files /dev/null and b/media/quiz_images/letter-W-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-W-American-Sign-Language-ASL_7aKQCLx.webp b/media/quiz_images/letter-W-American-Sign-Language-ASL_7aKQCLx.webp new file mode 100644 index 000000000..69c525f06 Binary files /dev/null and b/media/quiz_images/letter-W-American-Sign-Language-ASL_7aKQCLx.webp differ diff --git a/media/quiz_images/letter-X-American-Sign-Language-ASL.webp b/media/quiz_images/letter-X-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..eb36050ac Binary files /dev/null and b/media/quiz_images/letter-X-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-Y-American-Sign-Language-ASL.webp b/media/quiz_images/letter-Y-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..8e8d2ff31 Binary files /dev/null and b/media/quiz_images/letter-Y-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-Z-American-Sign-Language-ASL.webp b/media/quiz_images/letter-Z-American-Sign-Language-ASL.webp new file mode 100644 index 000000000..341766b47 Binary files /dev/null and b/media/quiz_images/letter-Z-American-Sign-Language-ASL.webp differ diff --git a/media/quiz_images/letter-Z-American-Sign-Language-ASL_US45tRz.webp b/media/quiz_images/letter-Z-American-Sign-Language-ASL_US45tRz.webp new file mode 100644 index 000000000..341766b47 Binary files /dev/null and b/media/quiz_images/letter-Z-American-Sign-Language-ASL_US45tRz.webp differ diff --git a/media/quiz_images/more_download.png b/media/quiz_images/more_download.png new file mode 100644 index 000000000..e4140d25b Binary files /dev/null and b/media/quiz_images/more_download.png differ diff --git a/media/quiz_images/nice_images.png b/media/quiz_images/nice_images.png new file mode 100644 index 000000000..c851e439e Binary files /dev/null and b/media/quiz_images/nice_images.png differ diff --git a/media/quiz_images/play_download.png b/media/quiz_images/play_download.png new file mode 100644 index 000000000..89d9df64b Binary files /dev/null and b/media/quiz_images/play_download.png differ diff --git a/media/quiz_images/play_download_ktVj0u5.png b/media/quiz_images/play_download_ktVj0u5.png new file mode 100644 index 000000000..89d9df64b Binary files /dev/null and b/media/quiz_images/play_download_ktVj0u5.png differ diff --git a/media/quiz_images/pls_download.png b/media/quiz_images/pls_download.png new file mode 100644 index 000000000..1c3252951 Binary files /dev/null and b/media/quiz_images/pls_download.png differ diff --git a/media/quiz_images/thank_you_download.jpeg b/media/quiz_images/thank_you_download.jpeg new file mode 100644 index 000000000..fb2aa1f26 Binary files /dev/null and b/media/quiz_images/thank_you_download.jpeg differ diff --git a/media/quiz_images/wait_download.png b/media/quiz_images/wait_download.png new file mode 100644 index 000000000..0a9a2f692 Binary files /dev/null and b/media/quiz_images/wait_download.png differ diff --git a/media/quiz_images/wait_download_Mfkr8dx.png b/media/quiz_images/wait_download_Mfkr8dx.png new file mode 100644 index 000000000..0a9a2f692 Binary files /dev/null and b/media/quiz_images/wait_download_Mfkr8dx.png differ diff --git a/media/quiz_images/yes_download.png b/media/quiz_images/yes_download.png new file mode 100644 index 000000000..1c338857a Binary files /dev/null and b/media/quiz_images/yes_download.png differ diff --git a/media/word-match/apple_download.png b/media/word-match/apple_download.png new file mode 100644 index 000000000..05dfe3ad5 Binary files /dev/null and b/media/word-match/apple_download.png differ diff --git a/media/word-match/apple_download_WMw3fmE.png b/media/word-match/apple_download_WMw3fmE.png new file mode 100644 index 000000000..05dfe3ad5 Binary files /dev/null and b/media/word-match/apple_download_WMw3fmE.png differ diff --git a/media/word-match/cow_download.png b/media/word-match/cow_download.png new file mode 100644 index 000000000..7d02accac Binary files /dev/null and b/media/word-match/cow_download.png differ diff --git a/media/word-match/hello.webp b/media/word-match/hello.webp new file mode 100644 index 000000000..fb4010507 Binary files /dev/null and b/media/word-match/hello.webp differ diff --git a/media/word-match/milk.png b/media/word-match/milk.png new file mode 100644 index 000000000..13b8a0fc5 Binary files /dev/null and b/media/word-match/milk.png differ diff --git a/media/word-match/milk_download.png b/media/word-match/milk_download.png new file mode 100644 index 000000000..2f09e17ac Binary files /dev/null and b/media/word-match/milk_download.png differ diff --git a/media/word-match/more.png b/media/word-match/more.png new file mode 100644 index 000000000..273cfc13e Binary files /dev/null and b/media/word-match/more.png differ diff --git a/media/word-match/no_download.png b/media/word-match/no_download.png new file mode 100644 index 000000000..344e7ca4e Binary files /dev/null and b/media/word-match/no_download.png differ diff --git a/media/word-match/pls_download.png b/media/word-match/pls_download.png new file mode 100644 index 000000000..1c3252951 Binary files /dev/null and b/media/word-match/pls_download.png differ diff --git a/media/word-match/wait_download.png b/media/word-match/wait_download.png new file mode 100644 index 000000000..0a9a2f692 Binary files /dev/null and b/media/word-match/wait_download.png differ diff --git a/media/word_match/hello_download.png b/media/word_match/hello_download.png new file mode 100644 index 000000000..57171ce8e Binary files /dev/null and b/media/word_match/hello_download.png differ diff --git a/media/word_match/nice_images.png b/media/word_match/nice_images.png new file mode 100644 index 000000000..c851e439e Binary files /dev/null and b/media/word_match/nice_images.png differ diff --git a/media/word_match/play_download.png b/media/word_match/play_download.png new file mode 100644 index 000000000..89d9df64b Binary files /dev/null and b/media/word_match/play_download.png differ diff --git a/media/word_match/thank_you_download.jpeg b/media/word_match/thank_you_download.jpeg new file mode 100644 index 000000000..fb2aa1f26 Binary files /dev/null and b/media/word_match/thank_you_download.jpeg differ diff --git a/ppt/Cream and Beige Simple Clean Project Overview Presentation.pdf b/ppt/Cream and Beige Simple Clean Project Overview Presentation.pdf new file mode 100644 index 000000000..5c64337c6 Binary files /dev/null and b/ppt/Cream and Beige Simple Clean Project Overview Presentation.pdf differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..4983b88c0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +SpeechRecognition +pyaudio +opencv-python +numpy +Pillow +django-cors-headers +gradio +torch +transformers +gdown +# mediapipe +keras.models +cv2 diff --git a/sign_to_text/streamlit_app.py b/sign_to_text/streamlit_app.py new file mode 100644 index 000000000..2895c3118 --- /dev/null +++ b/sign_to_text/streamlit_app.py @@ -0,0 +1,163 @@ +import streamlit as st +import numpy as np +from keras.models import load_model +import cv2 +from io import BytesIO +import mediapipe as mp +import gdown +import os + +file_id = "1jIo5AVy8k70zITDegQqzNwfMaQfpKRU7" +output_path = "sign_asl_cnn_30_epochs.h5" + +# Download model if not already present +if not os.path.exists(output_path): + url = f"https://drive.google.com/uc?id={file_id}" + gdown.download(url, output_path, quiet=False) + +# Load model +from keras.models import load_model +model = load_model(output_path) +class_labels = {i: str(i) if i < 10 else chr(65 + i - 10) for i in range(36)} + +# Function to preprocess the image +def preprocess_image(image): + image = cv2.resize(image, (200, 200)) + image = image / 255.0 + image = image.reshape(1, 200, 200, 3) + return image + +# Function to predict the sign language letter +def predict_letter(image): + processed_image = preprocess_image(image) + predictions = model.predict(processed_image) + predicted_class = np.argmax(predictions, axis=1)[0] + sign_letter = class_labels[predicted_class] + return sign_letter + +# Function to detect hands in the image +def detect_hands(image): + mp_hands = mp.solutions.hands + hands = mp_hands.Hands() + margin = 15 + + # Convert the image to RGB + image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) + + # Process the image and get the hand landmarks + results = hands.process(image_rgb) + + if results.multi_hand_landmarks: + for landmarks in results.multi_hand_landmarks: + # Get bounding box coordinates of the hand + landmarks_xy = [(int(landmark.x * image.shape[1]), int(landmark.y * image.shape[0])) + for landmark in landmarks.landmark] + + # Define the bounding box for the hand + x_min = max(0, min(landmarks_xy, key=lambda x: x[0])[0] - margin) + y_min = max(0, min(landmarks_xy, key=lambda x: x[1])[1] - margin) + x_max = min(image.shape[1], max(landmarks_xy, key=lambda x: x[0])[0] + margin) + y_max = min(image.shape[0], max(landmarks_xy, key=lambda x: x[1])[1] + margin) + + # Extract the hand region + roi = image[y_min:y_max, x_min:x_max] + + # Check if the ROI is empty + if roi.size == 0: + continue + + # Resize the ROI to match your model's input shape + roi = cv2.resize(roi, (200, 200), interpolation=cv2.INTER_AREA) + hsv = cv2.cvtColor(roi, cv2.COLOR_BGR2RGB) + + lower_yellow = np.array([93, 72, 51]) + upper_yellow = np.array([224, 194, 183]) + mask = cv2.inRange(hsv, lower_yellow, upper_yellow) + roi = cv2.bitwise_and(roi, roi, mask=mask) + roi = roi.reshape(1, 200, 200, 3) # Ensure it matches your model's input shape + + # Make predictions using your classifier + predictions = model.predict(roi) + predicted_class = int(np.argmax(predictions, axis=1)[0]) + result = class_labels[predicted_class] + + # Draw result on the image + cv2.putText(image, str(result), (x_min, y_min - 10), + cv2.FONT_HERSHEY_COMPLEX, 1, (0, 255, 0), 2) + + # Draw bounding box on the image + cv2.rectangle(image, (x_min, y_min), (x_max, y_max), (255, 0, 0), 2) + + return image + +# Streamlit app +st.title('Sign Language Recognition') + +# Sidebar with radio button for Upload/Webcam +selected_option = st.sidebar.radio("Select Option", ["Upload", "Webcam"], index=0) + +if selected_option == "Upload": + uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "png"]) + + if uploaded_file is not None: + if st.button('Predict'): + contents = uploaded_file.read() + nparr = np.frombuffer(contents, np.uint8) + image = cv2.imdecode(nparr, cv2.IMREAD_COLOR) + + # Make the prediction + predicted_letter = predict_letter(image) + + # Display the predicted letter + st.write('Predicted Letter:', predicted_letter) + +elif selected_option == "Webcam": + # Placeholder for webcam frame + webcam_frame = st.empty() + + # Placeholder for predicted letter in webcam mode + predicted_letter_webcam = st.empty() + + # Placeholder for webcam capture status + webcam_capture_status = st.empty() + + # Placeholder for webcam stop button + webcam_stop_button = st.empty() + + # Placeholder for webcam status + webcam_status = st.empty() + + # Placeholder for webcam button + webcam_button = st.button("Start Webcam") + + if webcam_button: + webcam_status.text("Webcam is on.") + webcam_stop_button = st.button("Stop Webcam") + + # OpenCV video capture + cap = cv2.VideoCapture(0) + + while True: + # Read the frame from the webcam + ret, frame = cap.read() + + # Display the frame in Streamlit + webcam_frame.image(frame, channels="BGR") + + # Detect hands in the current frame + frame = detect_hands(frame) + + # Convert the frame to JPEG format + _, jpeg = cv2.imencode(".jpg", frame) + + # Display the predicted letter + predicted_letter = predict_letter(frame) + predicted_letter_webcam.text(f"Predicted Letter: {predicted_letter}") + + # Check if the "Stop Webcam" button is clicked + if webcam_stop_button: + webcam_status.text("Webcam is off.") + break + + # Release the webcam when done + cap.release() diff --git a/speech_to_text/__init__.py b/speech_to_text/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/speech_to_text/__pycache__/__init__.cpython-311.pyc b/speech_to_text/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..f567caae1 Binary files /dev/null and b/speech_to_text/__pycache__/__init__.cpython-311.pyc differ diff --git a/speech_to_text/__pycache__/__init__.cpython-312.pyc b/speech_to_text/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..3b17ef14c Binary files /dev/null and b/speech_to_text/__pycache__/__init__.cpython-312.pyc differ diff --git a/speech_to_text/__pycache__/__init__.cpython-313.pyc b/speech_to_text/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..d5bbbf777 Binary files /dev/null and b/speech_to_text/__pycache__/__init__.cpython-313.pyc differ diff --git a/speech_to_text/__pycache__/admin.cpython-311.pyc b/speech_to_text/__pycache__/admin.cpython-311.pyc new file mode 100644 index 000000000..c3689c997 Binary files /dev/null and b/speech_to_text/__pycache__/admin.cpython-311.pyc differ diff --git a/speech_to_text/__pycache__/admin.cpython-312.pyc b/speech_to_text/__pycache__/admin.cpython-312.pyc new file mode 100644 index 000000000..0ed39b2c2 Binary files /dev/null and b/speech_to_text/__pycache__/admin.cpython-312.pyc differ diff --git a/speech_to_text/__pycache__/admin.cpython-313.pyc b/speech_to_text/__pycache__/admin.cpython-313.pyc new file mode 100644 index 000000000..9c7f283e0 Binary files /dev/null and b/speech_to_text/__pycache__/admin.cpython-313.pyc differ diff --git a/speech_to_text/__pycache__/apps.cpython-311.pyc b/speech_to_text/__pycache__/apps.cpython-311.pyc new file mode 100644 index 000000000..a313e5b4c Binary files /dev/null and b/speech_to_text/__pycache__/apps.cpython-311.pyc differ diff --git a/speech_to_text/__pycache__/apps.cpython-312.pyc b/speech_to_text/__pycache__/apps.cpython-312.pyc new file mode 100644 index 000000000..40bcc2562 Binary files /dev/null and b/speech_to_text/__pycache__/apps.cpython-312.pyc differ diff --git a/speech_to_text/__pycache__/apps.cpython-313.pyc b/speech_to_text/__pycache__/apps.cpython-313.pyc new file mode 100644 index 000000000..29cd49151 Binary files /dev/null and b/speech_to_text/__pycache__/apps.cpython-313.pyc differ diff --git a/speech_to_text/__pycache__/models.cpython-311.pyc b/speech_to_text/__pycache__/models.cpython-311.pyc new file mode 100644 index 000000000..6e7602d05 Binary files /dev/null and b/speech_to_text/__pycache__/models.cpython-311.pyc differ diff --git a/speech_to_text/__pycache__/models.cpython-312.pyc b/speech_to_text/__pycache__/models.cpython-312.pyc new file mode 100644 index 000000000..d0c5bec4b Binary files /dev/null and b/speech_to_text/__pycache__/models.cpython-312.pyc differ diff --git a/speech_to_text/__pycache__/models.cpython-313.pyc b/speech_to_text/__pycache__/models.cpython-313.pyc new file mode 100644 index 000000000..ce12198bd Binary files /dev/null and b/speech_to_text/__pycache__/models.cpython-313.pyc differ diff --git a/speech_to_text/__pycache__/urls.cpython-311.pyc b/speech_to_text/__pycache__/urls.cpython-311.pyc new file mode 100644 index 000000000..5ce28808e Binary files /dev/null and b/speech_to_text/__pycache__/urls.cpython-311.pyc differ diff --git a/speech_to_text/__pycache__/urls.cpython-312.pyc b/speech_to_text/__pycache__/urls.cpython-312.pyc new file mode 100644 index 000000000..a32f9a560 Binary files /dev/null and b/speech_to_text/__pycache__/urls.cpython-312.pyc differ diff --git a/speech_to_text/__pycache__/urls.cpython-313.pyc b/speech_to_text/__pycache__/urls.cpython-313.pyc new file mode 100644 index 000000000..680601b4d Binary files /dev/null and b/speech_to_text/__pycache__/urls.cpython-313.pyc differ diff --git a/speech_to_text/__pycache__/views.cpython-311.pyc b/speech_to_text/__pycache__/views.cpython-311.pyc new file mode 100644 index 000000000..cc29e2326 Binary files /dev/null and b/speech_to_text/__pycache__/views.cpython-311.pyc differ diff --git a/speech_to_text/__pycache__/views.cpython-312.pyc b/speech_to_text/__pycache__/views.cpython-312.pyc new file mode 100644 index 000000000..dbaf58752 Binary files /dev/null and b/speech_to_text/__pycache__/views.cpython-312.pyc differ diff --git a/speech_to_text/__pycache__/views.cpython-313.pyc b/speech_to_text/__pycache__/views.cpython-313.pyc new file mode 100644 index 000000000..133f8ff8d Binary files /dev/null and b/speech_to_text/__pycache__/views.cpython-313.pyc differ diff --git a/speech_to_text/admin.py b/speech_to_text/admin.py new file mode 100644 index 000000000..8c38f3f3d --- /dev/null +++ b/speech_to_text/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/speech_to_text/apps.py b/speech_to_text/apps.py new file mode 100644 index 000000000..80ac3471a --- /dev/null +++ b/speech_to_text/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class SpeechToTextConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'speech_to_text' diff --git a/speech_to_text/migrations/__init__.py b/speech_to_text/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/speech_to_text/migrations/__pycache__/__init__.cpython-311.pyc b/speech_to_text/migrations/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..876f13dc5 Binary files /dev/null and b/speech_to_text/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/speech_to_text/migrations/__pycache__/__init__.cpython-312.pyc b/speech_to_text/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 000000000..ceb1e355e Binary files /dev/null and b/speech_to_text/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/speech_to_text/migrations/__pycache__/__init__.cpython-313.pyc b/speech_to_text/migrations/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..b139c9bba Binary files /dev/null and b/speech_to_text/migrations/__pycache__/__init__.cpython-313.pyc differ diff --git a/speech_to_text/models.py b/speech_to_text/models.py new file mode 100644 index 000000000..71a836239 --- /dev/null +++ b/speech_to_text/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/speech_to_text/templates/display_asl.html b/speech_to_text/templates/display_asl.html new file mode 100644 index 000000000..e1f874779 --- /dev/null +++ b/speech_to_text/templates/display_asl.html @@ -0,0 +1,112 @@ +{% comment %} {% load static %} + + + + + + + ASL Sign Display +
+

ASL Sign Display

+

{{ input_text }}

+ ASL Sign +
+ + + {{ image_urls|json_script:"asl_images" }} + + + + + + + + {% endcomment %} +{% load static %} + + + + + + + ASL Sign Display +
+

ASL Sign Display

+

{{ input_text }}

+ ASL Sign +
+ + + {{ image_urls|json_script:"asl_images" }} + + + + + + \ No newline at end of file diff --git a/speech_to_text/templates/index.html b/speech_to_text/templates/index.html new file mode 100644 index 000000000..44689aba9 --- /dev/null +++ b/speech_to_text/templates/index.html @@ -0,0 +1,113 @@ +{% csrf_token %} + + + + + + + Speech to Text + + + +
+

Click to Record and Transcribe

+ +

Your transcribed text will appear here...

+
+ + + + \ No newline at end of file diff --git a/speech_to_text/templates/redirect_to_sign.html b/speech_to_text/templates/redirect_to_sign.html new file mode 100644 index 000000000..e7b26d4d3 --- /dev/null +++ b/speech_to_text/templates/redirect_to_sign.html @@ -0,0 +1,66 @@ +{% comment %} + + + + + Speech to Text + + + +
+

✅ Transcribed Text: "{{ transcribed_text }}"

+ +
+ + + + {% endcomment %} + + + + + + Transcription Complete + + +

Transcription Successful!

+

Transcribed Text: {{ transcribed_text }}

+ +
+ + +
+ + \ No newline at end of file diff --git a/speech_to_text/tests.py b/speech_to_text/tests.py new file mode 100644 index 000000000..7ce503c2d --- /dev/null +++ b/speech_to_text/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/speech_to_text/urls.py b/speech_to_text/urls.py new file mode 100644 index 000000000..df4c20029 --- /dev/null +++ b/speech_to_text/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from .views import record_and_transcribe,speech_to_text_home + +urlpatterns = [ + path('ab/', speech_to_text_home, name='speech-home'), + path('transcribe/', record_and_transcribe, name='speech-to-text'), +] \ No newline at end of file diff --git a/speech_to_text/views.py b/speech_to_text/views.py new file mode 100644 index 000000000..573a57446 --- /dev/null +++ b/speech_to_text/views.py @@ -0,0 +1,28 @@ +from django.views.decorators.csrf import csrf_exempt +import speech_recognition as sr +from django.http import JsonResponse +from django.shortcuts import render + +def speech_to_text_home(request): + return render(request, "index.html") + +@csrf_exempt # Add this to disable CSRF for this function +def record_and_transcribe(request): + if request.method == "POST": + recognizer = sr.Recognizer() + with sr.Microphone() as source: + print("Say something... (Recording)") + recognizer.adjust_for_ambient_noise(source) # Reduce background noise + audio = recognizer.listen(source) # Capture audio + + try: + print("Converting speech to text...") + text = recognizer.recognize_google(audio) # Convert speech to text + return JsonResponse({"transcribed_text": text}) + + except sr.UnknownValueError: + return JsonResponse({"error": "Could not understand the audio"}, status=400) + except sr.RequestError: + return JsonResponse({"error": "Error with the speech recognition service"}, status=500) + + return JsonResponse({"message": "Send a POST request to transcribe speech"}, status=405) \ No newline at end of file diff --git a/static/images/0.png b/static/images/0.png new file mode 100644 index 000000000..c54ad4789 Binary files /dev/null and b/static/images/0.png differ diff --git a/static/images/1.png b/static/images/1.png new file mode 100644 index 000000000..b0de4701c Binary files /dev/null and b/static/images/1.png differ diff --git a/static/images/2.png b/static/images/2.png new file mode 100644 index 000000000..5873ea0b1 Binary files /dev/null and b/static/images/2.png differ diff --git a/static/images/3.png b/static/images/3.png new file mode 100644 index 000000000..1d292b1d1 Binary files /dev/null and b/static/images/3.png differ diff --git a/static/images/4.png b/static/images/4.png new file mode 100644 index 000000000..bff55fe70 Binary files /dev/null and b/static/images/4.png differ diff --git a/static/images/5.png b/static/images/5.png new file mode 100644 index 000000000..75a8b4ba5 Binary files /dev/null and b/static/images/5.png differ diff --git a/static/images/6.png b/static/images/6.png new file mode 100644 index 000000000..2ff312834 Binary files /dev/null and b/static/images/6.png differ diff --git a/static/images/7.png b/static/images/7.png new file mode 100644 index 000000000..9d39d4609 Binary files /dev/null and b/static/images/7.png differ diff --git a/static/images/8.png b/static/images/8.png new file mode 100644 index 000000000..9d4ed0be1 Binary files /dev/null and b/static/images/8.png differ diff --git a/static/images/9.png b/static/images/9.png new file mode 100644 index 000000000..d91d22fb4 Binary files /dev/null and b/static/images/9.png differ diff --git a/static/images/A.png b/static/images/A.png new file mode 100644 index 000000000..b5dc4e88e Binary files /dev/null and b/static/images/A.png differ diff --git a/static/images/B.png b/static/images/B.png new file mode 100644 index 000000000..9491c23cc Binary files /dev/null and b/static/images/B.png differ diff --git a/static/images/C.png b/static/images/C.png new file mode 100644 index 000000000..0739e5c4d Binary files /dev/null and b/static/images/C.png differ diff --git a/static/images/D.png b/static/images/D.png new file mode 100644 index 000000000..b5d91910e Binary files /dev/null and b/static/images/D.png differ diff --git a/static/images/E.png b/static/images/E.png new file mode 100644 index 000000000..6056d367c Binary files /dev/null and b/static/images/E.png differ diff --git a/static/images/EV/1.png b/static/images/EV/1.png new file mode 100644 index 000000000..f8c91b507 Binary files /dev/null and b/static/images/EV/1.png differ diff --git a/static/images/EV/10.png b/static/images/EV/10.png new file mode 100644 index 000000000..489c9b03f Binary files /dev/null and b/static/images/EV/10.png differ diff --git a/static/images/EV/2.png b/static/images/EV/2.png new file mode 100644 index 000000000..e8961ed9f Binary files /dev/null and b/static/images/EV/2.png differ diff --git a/static/images/EV/3.png b/static/images/EV/3.png new file mode 100644 index 000000000..1d59429f9 Binary files /dev/null and b/static/images/EV/3.png differ diff --git a/static/images/EV/4.png b/static/images/EV/4.png new file mode 100644 index 000000000..c30073143 Binary files /dev/null and b/static/images/EV/4.png differ diff --git a/static/images/EV/5.png b/static/images/EV/5.png new file mode 100644 index 000000000..5ebda10fa Binary files /dev/null and b/static/images/EV/5.png differ diff --git a/static/images/EV/6.png b/static/images/EV/6.png new file mode 100644 index 000000000..e4cbc6696 Binary files /dev/null and b/static/images/EV/6.png differ diff --git a/static/images/EV/7.png b/static/images/EV/7.png new file mode 100644 index 000000000..c438e7e14 Binary files /dev/null and b/static/images/EV/7.png differ diff --git a/static/images/EV/8.png b/static/images/EV/8.png new file mode 100644 index 000000000..57a2acad2 Binary files /dev/null and b/static/images/EV/8.png differ diff --git a/static/images/EV/9.png b/static/images/EV/9.png new file mode 100644 index 000000000..8d2e70558 Binary files /dev/null and b/static/images/EV/9.png differ diff --git a/static/images/F.png b/static/images/F.png new file mode 100644 index 000000000..46a75b265 Binary files /dev/null and b/static/images/F.png differ diff --git a/static/images/G.png b/static/images/G.png new file mode 100644 index 000000000..b787276d5 Binary files /dev/null and b/static/images/G.png differ diff --git a/static/images/Good_bye.png b/static/images/Good_bye.png new file mode 100644 index 000000000..0c2fda64c Binary files /dev/null and b/static/images/Good_bye.png differ diff --git a/static/images/Good_morning.png b/static/images/Good_morning.png new file mode 100644 index 000000000..ecad6e61a Binary files /dev/null and b/static/images/Good_morning.png differ diff --git a/static/images/Greeting.png b/static/images/Greeting.png new file mode 100644 index 000000000..5c14c1cb0 Binary files /dev/null and b/static/images/Greeting.png differ diff --git a/static/images/H.png b/static/images/H.png new file mode 100644 index 000000000..832cb0110 Binary files /dev/null and b/static/images/H.png differ diff --git a/static/images/Hello.png b/static/images/Hello.png new file mode 100644 index 000000000..337cfdca2 Binary files /dev/null and b/static/images/Hello.png differ diff --git a/static/images/I.png b/static/images/I.png new file mode 100644 index 000000000..cab5d4673 Binary files /dev/null and b/static/images/I.png differ diff --git a/static/images/J.png b/static/images/J.png new file mode 100644 index 000000000..32dd343e5 Binary files /dev/null and b/static/images/J.png differ diff --git a/static/images/K.png b/static/images/K.png new file mode 100644 index 000000000..1ebb1c895 Binary files /dev/null and b/static/images/K.png differ diff --git a/static/images/L.png b/static/images/L.png new file mode 100644 index 000000000..917d9a114 Binary files /dev/null and b/static/images/L.png differ diff --git a/static/images/M.png b/static/images/M.png new file mode 100644 index 000000000..c127654eb Binary files /dev/null and b/static/images/M.png differ diff --git a/static/images/N.png b/static/images/N.png new file mode 100644 index 000000000..fe6474997 Binary files /dev/null and b/static/images/N.png differ diff --git a/static/images/O.png b/static/images/O.png new file mode 100644 index 000000000..1ec1d14ce Binary files /dev/null and b/static/images/O.png differ diff --git a/static/images/P.png b/static/images/P.png new file mode 100644 index 000000000..d9aff1ec6 Binary files /dev/null and b/static/images/P.png differ diff --git a/static/images/Q.png b/static/images/Q.png new file mode 100644 index 000000000..cfba73c52 Binary files /dev/null and b/static/images/Q.png differ diff --git a/static/images/R.png b/static/images/R.png new file mode 100644 index 000000000..dd799a691 Binary files /dev/null and b/static/images/R.png differ diff --git a/static/images/S.png b/static/images/S.png new file mode 100644 index 000000000..ae54aa312 Binary files /dev/null and b/static/images/S.png differ diff --git a/static/images/Speech.png b/static/images/Speech.png new file mode 100644 index 000000000..67d6a668d Binary files /dev/null and b/static/images/Speech.png differ diff --git a/static/images/T.png b/static/images/T.png new file mode 100644 index 000000000..52e3fa201 Binary files /dev/null and b/static/images/T.png differ diff --git a/static/images/Text.png b/static/images/Text.png new file mode 100644 index 000000000..dc118fd43 Binary files /dev/null and b/static/images/Text.png differ diff --git a/static/images/Thank_you.png b/static/images/Thank_you.png new file mode 100644 index 000000000..e44379032 Binary files /dev/null and b/static/images/Thank_you.png differ diff --git a/static/images/U.png b/static/images/U.png new file mode 100644 index 000000000..7d1d0d0e7 Binary files /dev/null and b/static/images/U.png differ diff --git a/static/images/V.png b/static/images/V.png new file mode 100644 index 000000000..c6428f823 Binary files /dev/null and b/static/images/V.png differ diff --git a/static/images/W.png b/static/images/W.png new file mode 100644 index 000000000..89f762e9b Binary files /dev/null and b/static/images/W.png differ diff --git a/static/images/X.png b/static/images/X.png new file mode 100644 index 000000000..4f70dcae2 Binary files /dev/null and b/static/images/X.png differ diff --git a/static/images/Y.png b/static/images/Y.png new file mode 100644 index 000000000..58f22511d Binary files /dev/null and b/static/images/Y.png differ diff --git a/static/images/Z.png b/static/images/Z.png new file mode 100644 index 000000000..98dcdebab Binary files /dev/null and b/static/images/Z.png differ diff --git a/static/images/alphabet/A.png b/static/images/alphabet/A.png new file mode 100644 index 000000000..b5dc4e88e Binary files /dev/null and b/static/images/alphabet/A.png differ diff --git a/static/images/alphabet/B.png b/static/images/alphabet/B.png new file mode 100644 index 000000000..9491c23cc Binary files /dev/null and b/static/images/alphabet/B.png differ diff --git a/static/images/alphabet/C.png b/static/images/alphabet/C.png new file mode 100644 index 000000000..0739e5c4d Binary files /dev/null and b/static/images/alphabet/C.png differ diff --git a/static/images/alphabet/D.png b/static/images/alphabet/D.png new file mode 100644 index 000000000..b5d91910e Binary files /dev/null and b/static/images/alphabet/D.png differ diff --git a/static/images/alphabet/E.png b/static/images/alphabet/E.png new file mode 100644 index 000000000..6056d367c Binary files /dev/null and b/static/images/alphabet/E.png differ diff --git a/static/images/alphabet/F.png b/static/images/alphabet/F.png new file mode 100644 index 000000000..46a75b265 Binary files /dev/null and b/static/images/alphabet/F.png differ diff --git a/static/images/alphabet/G.png b/static/images/alphabet/G.png new file mode 100644 index 000000000..b787276d5 Binary files /dev/null and b/static/images/alphabet/G.png differ diff --git a/static/images/alphabet/H.png b/static/images/alphabet/H.png new file mode 100644 index 000000000..832cb0110 Binary files /dev/null and b/static/images/alphabet/H.png differ diff --git a/static/images/alphabet/I.png b/static/images/alphabet/I.png new file mode 100644 index 000000000..cab5d4673 Binary files /dev/null and b/static/images/alphabet/I.png differ diff --git a/static/images/alphabet/J.png b/static/images/alphabet/J.png new file mode 100644 index 000000000..32dd343e5 Binary files /dev/null and b/static/images/alphabet/J.png differ diff --git a/static/images/alphabet/K.png b/static/images/alphabet/K.png new file mode 100644 index 000000000..1ebb1c895 Binary files /dev/null and b/static/images/alphabet/K.png differ diff --git a/static/images/alphabet/L.png b/static/images/alphabet/L.png new file mode 100644 index 000000000..917d9a114 Binary files /dev/null and b/static/images/alphabet/L.png differ diff --git a/static/images/alphabet/M.png b/static/images/alphabet/M.png new file mode 100644 index 000000000..c127654eb Binary files /dev/null and b/static/images/alphabet/M.png differ diff --git a/static/images/alphabet/N.png b/static/images/alphabet/N.png new file mode 100644 index 000000000..fe6474997 Binary files /dev/null and b/static/images/alphabet/N.png differ diff --git a/static/images/alphabet/O.png b/static/images/alphabet/O.png new file mode 100644 index 000000000..1ec1d14ce Binary files /dev/null and b/static/images/alphabet/O.png differ diff --git a/static/images/alphabet/P.png b/static/images/alphabet/P.png new file mode 100644 index 000000000..d9aff1ec6 Binary files /dev/null and b/static/images/alphabet/P.png differ diff --git a/static/images/alphabet/Q.png b/static/images/alphabet/Q.png new file mode 100644 index 000000000..cfba73c52 Binary files /dev/null and b/static/images/alphabet/Q.png differ diff --git a/static/images/alphabet/R.png b/static/images/alphabet/R.png new file mode 100644 index 000000000..dd799a691 Binary files /dev/null and b/static/images/alphabet/R.png differ diff --git a/static/images/alphabet/S.png b/static/images/alphabet/S.png new file mode 100644 index 000000000..ae54aa312 Binary files /dev/null and b/static/images/alphabet/S.png differ diff --git a/static/images/alphabet/T.png b/static/images/alphabet/T.png new file mode 100644 index 000000000..52e3fa201 Binary files /dev/null and b/static/images/alphabet/T.png differ diff --git a/static/images/alphabet/U.png b/static/images/alphabet/U.png new file mode 100644 index 000000000..7d1d0d0e7 Binary files /dev/null and b/static/images/alphabet/U.png differ diff --git a/static/images/alphabet/V.png b/static/images/alphabet/V.png new file mode 100644 index 000000000..c6428f823 Binary files /dev/null and b/static/images/alphabet/V.png differ diff --git a/static/images/alphabet/W.png b/static/images/alphabet/W.png new file mode 100644 index 000000000..89f762e9b Binary files /dev/null and b/static/images/alphabet/W.png differ diff --git a/static/images/alphabet/X.png b/static/images/alphabet/X.png new file mode 100644 index 000000000..4f70dcae2 Binary files /dev/null and b/static/images/alphabet/X.png differ diff --git a/static/images/alphabet/Y.png b/static/images/alphabet/Y.png new file mode 100644 index 000000000..58f22511d Binary files /dev/null and b/static/images/alphabet/Y.png differ diff --git a/static/images/alphabet/Z.png b/static/images/alphabet/Z.png new file mode 100644 index 000000000..98dcdebab Binary files /dev/null and b/static/images/alphabet/Z.png differ diff --git a/static/images/feelings/First.png b/static/images/feelings/First.png new file mode 100644 index 000000000..987062640 Binary files /dev/null and b/static/images/feelings/First.png differ diff --git a/static/images/feelings/Help.png b/static/images/feelings/Help.png new file mode 100644 index 000000000..702e993d7 Binary files /dev/null and b/static/images/feelings/Help.png differ diff --git a/static/images/feelings/I_Love_you.png b/static/images/feelings/I_Love_you.png new file mode 100644 index 000000000..7fa17d266 Binary files /dev/null and b/static/images/feelings/I_Love_you.png differ diff --git a/static/images/feelings/Please.png b/static/images/feelings/Please.png new file mode 100644 index 000000000..5056d9de9 Binary files /dev/null and b/static/images/feelings/Please.png differ diff --git a/static/images/feelings/second.png b/static/images/feelings/second.png new file mode 100644 index 000000000..a56d7d13e Binary files /dev/null and b/static/images/feelings/second.png differ diff --git a/static/images/feelings/thied.png b/static/images/feelings/thied.png new file mode 100644 index 000000000..0bfbca891 Binary files /dev/null and b/static/images/feelings/thied.png differ diff --git a/static/images/feelings/yes-no.png b/static/images/feelings/yes-no.png new file mode 100644 index 000000000..8f87efff9 Binary files /dev/null and b/static/images/feelings/yes-no.png differ diff --git a/static/images/grammar/1.png b/static/images/grammar/1.png new file mode 100644 index 000000000..0ff72f8d3 Binary files /dev/null and b/static/images/grammar/1.png differ diff --git a/static/images/grammar/10.jpeg b/static/images/grammar/10.jpeg new file mode 100644 index 000000000..2f28a5981 Binary files /dev/null and b/static/images/grammar/10.jpeg differ diff --git a/static/images/grammar/2.png b/static/images/grammar/2.png new file mode 100644 index 000000000..d64e8a138 Binary files /dev/null and b/static/images/grammar/2.png differ diff --git a/static/images/grammar/3.png b/static/images/grammar/3.png new file mode 100644 index 000000000..528be34bd Binary files /dev/null and b/static/images/grammar/3.png differ diff --git a/static/images/grammar/4.png b/static/images/grammar/4.png new file mode 100644 index 000000000..bcab1b80e Binary files /dev/null and b/static/images/grammar/4.png differ diff --git a/static/images/grammar/5.png b/static/images/grammar/5.png new file mode 100644 index 000000000..d695f578a Binary files /dev/null and b/static/images/grammar/5.png differ diff --git a/static/images/grammar/6.png b/static/images/grammar/6.png new file mode 100644 index 000000000..2e5ec4f22 Binary files /dev/null and b/static/images/grammar/6.png differ diff --git a/static/images/grammar/7.png b/static/images/grammar/7.png new file mode 100644 index 000000000..ce498ac41 Binary files /dev/null and b/static/images/grammar/7.png differ diff --git a/static/images/grammar/8.png b/static/images/grammar/8.png new file mode 100644 index 000000000..0219a9658 Binary files /dev/null and b/static/images/grammar/8.png differ diff --git a/static/images/grammar/9.png b/static/images/grammar/9.png new file mode 100644 index 000000000..0a6f6648a Binary files /dev/null and b/static/images/grammar/9.png differ diff --git a/static/images/logo_signMaster.png b/static/images/logo_signMaster.png new file mode 100644 index 000000000..e8d021467 Binary files /dev/null and b/static/images/logo_signMaster.png differ diff --git a/static/images/matchwords.png b/static/images/matchwords.png new file mode 100644 index 000000000..5922d3682 Binary files /dev/null and b/static/images/matchwords.png differ diff --git a/static/images/numbers/0.png b/static/images/numbers/0.png new file mode 100644 index 000000000..c54ad4789 Binary files /dev/null and b/static/images/numbers/0.png differ diff --git a/static/images/numbers/1-5.png b/static/images/numbers/1-5.png new file mode 100644 index 000000000..fee0a8c76 Binary files /dev/null and b/static/images/numbers/1-5.png differ diff --git a/static/images/numbers/10.png b/static/images/numbers/10.png new file mode 100644 index 000000000..2e8dcc31c Binary files /dev/null and b/static/images/numbers/10.png differ diff --git a/static/images/numbers/100.png b/static/images/numbers/100.png new file mode 100644 index 000000000..7fae79161 Binary files /dev/null and b/static/images/numbers/100.png differ diff --git a/static/images/numbers/11-15.png b/static/images/numbers/11-15.png new file mode 100644 index 000000000..b7cf49dd6 Binary files /dev/null and b/static/images/numbers/11-15.png differ diff --git a/static/images/numbers/11-19.png b/static/images/numbers/11-19.png new file mode 100644 index 000000000..a8f2f7ca6 Binary files /dev/null and b/static/images/numbers/11-19.png differ diff --git a/static/images/numbers/20.png b/static/images/numbers/20.png new file mode 100644 index 000000000..5cef7a4ae Binary files /dev/null and b/static/images/numbers/20.png differ diff --git a/static/images/numbers/21.png b/static/images/numbers/21.png new file mode 100644 index 000000000..6b633ce7f Binary files /dev/null and b/static/images/numbers/21.png differ diff --git a/static/images/numbers/22.png b/static/images/numbers/22.png new file mode 100644 index 000000000..84150bd9e Binary files /dev/null and b/static/images/numbers/22.png differ diff --git a/static/images/numbers/23.png b/static/images/numbers/23.png new file mode 100644 index 000000000..4283b2a1d Binary files /dev/null and b/static/images/numbers/23.png differ diff --git a/static/images/numbers/24.png b/static/images/numbers/24.png new file mode 100644 index 000000000..cdf102142 Binary files /dev/null and b/static/images/numbers/24.png differ diff --git a/static/images/numbers/25.png b/static/images/numbers/25.png new file mode 100644 index 000000000..abc47efa0 Binary files /dev/null and b/static/images/numbers/25.png differ diff --git a/static/images/numbers/26.png b/static/images/numbers/26.png new file mode 100644 index 000000000..23527ac9a Binary files /dev/null and b/static/images/numbers/26.png differ diff --git a/static/images/numbers/27.png b/static/images/numbers/27.png new file mode 100644 index 000000000..875ec63a0 Binary files /dev/null and b/static/images/numbers/27.png differ diff --git a/static/images/numbers/28.png b/static/images/numbers/28.png new file mode 100644 index 000000000..1461c36fb Binary files /dev/null and b/static/images/numbers/28.png differ diff --git a/static/images/numbers/29.png b/static/images/numbers/29.png new file mode 100644 index 000000000..cf5e81364 Binary files /dev/null and b/static/images/numbers/29.png differ diff --git a/static/images/numbers/31-99.png b/static/images/numbers/31-99.png new file mode 100644 index 000000000..1f7cdc72e Binary files /dev/null and b/static/images/numbers/31-99.png differ diff --git a/static/images/numbers/6-9.png b/static/images/numbers/6-9.png new file mode 100644 index 000000000..dc77ce533 Binary files /dev/null and b/static/images/numbers/6-9.png differ diff --git a/static/images/numbers/multipule of 10(30 - 100).png b/static/images/numbers/multipule of 10(30 - 100).png new file mode 100644 index 000000000..49e390562 Binary files /dev/null and b/static/images/numbers/multipule of 10(30 - 100).png differ diff --git a/static/images/qus/How.png b/static/images/qus/How.png new file mode 100644 index 000000000..1d771a0e4 Binary files /dev/null and b/static/images/qus/How.png differ diff --git a/static/images/qus/What.png b/static/images/qus/What.png new file mode 100644 index 000000000..88536070b Binary files /dev/null and b/static/images/qus/What.png differ diff --git a/static/images/qus/When.png b/static/images/qus/When.png new file mode 100644 index 000000000..23b6b63a5 Binary files /dev/null and b/static/images/qus/When.png differ diff --git a/static/images/qus/Where.png b/static/images/qus/Where.png new file mode 100644 index 000000000..243d9574b Binary files /dev/null and b/static/images/qus/Where.png differ diff --git a/static/images/qus/Which.png b/static/images/qus/Which.png new file mode 100644 index 000000000..1ab8f0e62 Binary files /dev/null and b/static/images/qus/Which.png differ diff --git a/static/images/qus/Who.png b/static/images/qus/Who.png new file mode 100644 index 000000000..b4f4ac89e Binary files /dev/null and b/static/images/qus/Who.png differ diff --git a/static/images/qus/Why.png b/static/images/qus/Why.png new file mode 100644 index 000000000..fd0d1028a Binary files /dev/null and b/static/images/qus/Why.png differ diff --git a/static/images/space.png b/static/images/space.png new file mode 100644 index 000000000..60d82c3a6 Binary files /dev/null and b/static/images/space.png differ diff --git a/static/images/typingGame.png b/static/images/typingGame.png new file mode 100644 index 000000000..4b5b03342 Binary files /dev/null and b/static/images/typingGame.png differ