diff --git a/README.md b/README.md
index 407e925..8425082 100644
--- a/README.md
+++ b/README.md
@@ -1,38 +1,43 @@
-AI Student Hackathon - Project Submission
+# LearnallAI : A step toward Customised AI
-Welcome to the submission day of our AI Student Hackathon! 🚀
+This is my submission for @buildfastwithai[https://buildfastwithai.com/] hackathon
+Provides:-
+- Customised explanation
+- Roadmap for future growth
+- Quiz to test level of knowledge
-We’re thrilled to have you participate and can't wait to see your innovative AI apps. Please follow the instructions below to submit your project for evaluation.
+## Description
+A app to help students learn new concepts according to their level of understanding and also to help student understand notes with the help of AI according to their level of understanding and comprehension.
+- Educhain for Quiz generation
+- Django for website making
+- Gemini API for integration with AI
+- Render for deploying
-Submission Details
+Right now i have not integrated many featuress but will do it shortly like:
+-Good formatting
+-user authentication
+-chat storage system
+-postgres database
+-also i will make a custom finetuned model for this task
-Submit the following information via the provided Google Form for us to access your AI applications:
-Team Name: Your team's unique name.
+##STEPS TO USE
+1. Go to website
+ 
-App Name: The name of your AI application.
+2. Enter the topicyou want to learn like deep learning and SUBMIT
+ - if you are complete beginner then mark the checkbox
+ 
-App Description: A brief overview of what your app does and its core features.
+4. Answer the questions upto your knowledge and click NEXT
+ 
-GitHub PR Link: The link to your Pull Request (PR) in the project repository.
+5. Here you have your custom explanation
+ - SORRY RIGHT NOW THE FORMATTING IS A LITTLE UGLY BUT WILL IMPROVE
+ 
-App Link: A link to the deployed version of your app.
+You can use it for explaining documents in a similar way
-Loom Video: A demo video link showing your app in action.
-
-
-For detailed submission guidelines, please refer to the last doubt session recording: https://www.buildfastwithai.com/hackathon.
-
-Important Links:
-
-Google Form for Submission :- https://forms.gle/JVXGjYhxtdAhTGgm6
-
-GitHub Project Submission Link :- https://shorturl.at/zgs3m
-
-Deadline
-⏰ Submission Deadline: Tonight, 11:59 PM. Make sure all components are submitted on time to ensure your project is evaluated.
-
-Good luck, and we look forward to reviewing your amazing projects!
----
-Hackathon Organizers
-Build Fast with AI
+Thank you and i welcome any sort of suggestions
+and also i thank to build fast with ai for making me do such a thing
+VISIT THEIR WEBSITE :- https://buildfastwithai.com/
diff --git a/build_files.sh b/build_files.sh
new file mode 100644
index 0000000..e69de29
diff --git a/db.sqlite3 b/db.sqlite3
new file mode 100644
index 0000000..b0e1141
Binary files /dev/null and b/db.sqlite3 differ
diff --git a/manage.py b/manage.py
new file mode 100644
index 0000000..e398d8f
--- /dev/null
+++ b/manage.py
@@ -0,0 +1,22 @@
+#!/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', 'mysite.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()
diff --git a/myapp/__init__.py b/myapp/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/myapp/__pycache__/__init__.cpython-312.pyc b/myapp/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..c4b76ac
Binary files /dev/null and b/myapp/__pycache__/__init__.cpython-312.pyc differ
diff --git a/myapp/__pycache__/admin.cpython-312.pyc b/myapp/__pycache__/admin.cpython-312.pyc
new file mode 100644
index 0000000..89d0de5
Binary files /dev/null and b/myapp/__pycache__/admin.cpython-312.pyc differ
diff --git a/myapp/__pycache__/apps.cpython-312.pyc b/myapp/__pycache__/apps.cpython-312.pyc
new file mode 100644
index 0000000..298142c
Binary files /dev/null and b/myapp/__pycache__/apps.cpython-312.pyc differ
diff --git a/myapp/__pycache__/helping_utils.cpython-312.pyc b/myapp/__pycache__/helping_utils.cpython-312.pyc
new file mode 100644
index 0000000..213a1b0
Binary files /dev/null and b/myapp/__pycache__/helping_utils.cpython-312.pyc differ
diff --git a/myapp/__pycache__/models.cpython-312.pyc b/myapp/__pycache__/models.cpython-312.pyc
new file mode 100644
index 0000000..0a32436
Binary files /dev/null and b/myapp/__pycache__/models.cpython-312.pyc differ
diff --git a/myapp/__pycache__/urls.cpython-312.pyc b/myapp/__pycache__/urls.cpython-312.pyc
new file mode 100644
index 0000000..c975ca4
Binary files /dev/null and b/myapp/__pycache__/urls.cpython-312.pyc differ
diff --git a/myapp/__pycache__/views.cpython-312.pyc b/myapp/__pycache__/views.cpython-312.pyc
new file mode 100644
index 0000000..4d40c59
Binary files /dev/null and b/myapp/__pycache__/views.cpython-312.pyc differ
diff --git a/myapp/admin.py b/myapp/admin.py
new file mode 100644
index 0000000..ea5d68b
--- /dev/null
+++ b/myapp/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/myapp/apps.py b/myapp/apps.py
new file mode 100644
index 0000000..af1106d
--- /dev/null
+++ b/myapp/apps.py
@@ -0,0 +1,6 @@
+from django.apps import AppConfig
+
+
+class MyappConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'myapp'
diff --git a/myapp/helping_utils.py b/myapp/helping_utils.py
new file mode 100644
index 0000000..6cf7b60
--- /dev/null
+++ b/myapp/helping_utils.py
@@ -0,0 +1,43 @@
+
+def text_formatter(txt):
+ # txt = txt.replace('\n', ' ')
+ temp =txt
+ new = ''
+ rep = '
'
+ find = False
+ rep2 = '
'
+ i = 0
+ while i < len(temp) - 2:
+ if temp[i] + temp[i + 1] == '* ':
+ # Add the current header tag (
or
)
+ new += rep2
+ find = True
+ # Skip the next character because we've processed both '*'
+ i += 2
+
+ if temp[i] == '.' and find:
+ new += '
'
+ find = False
+ i += 1
+
+ elif temp[i] + temp[i + 1] == '**':
+ # Add the current header tag (
or
)
+ new += rep
+ # Alternate between opening and closing tags
+ rep = '' if rep == '
' else '
'
+ # Skip the next character because we've processed both '*'
+ i += 2
+
+ else:
+ # Add the current character if it's not part of '**'
+ new += temp[i]
+ i += 1
+
+ # Add the last character if it was skipped by the loop
+ if i < len(temp):
+ new += temp[i]
+
+ # temp = new.replace('##', '
')
+ lst = list(temp.partition(' '))
+
+ return lst
\ No newline at end of file
diff --git a/myapp/migrations/__init__.py b/myapp/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/myapp/migrations/__pycache__/__init__.cpython-312.pyc b/myapp/migrations/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..fd097d4
Binary files /dev/null and b/myapp/migrations/__pycache__/__init__.cpython-312.pyc differ
diff --git a/myapp/models.py b/myapp/models.py
new file mode 100644
index 0000000..fd18c6e
--- /dev/null
+++ b/myapp/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/myapp/templates/home.html b/myapp/templates/home.html
new file mode 100644
index 0000000..65917bd
--- /dev/null
+++ b/myapp/templates/home.html
@@ -0,0 +1,142 @@
+
+
+
+
+
+ Home Page
+
+
+
+ {% if popup %}
+
+ {% endif %}
+
+
+
+
+
+
diff --git a/myapp/tests.py b/myapp/tests.py
new file mode 100644
index 0000000..de8bdc0
--- /dev/null
+++ b/myapp/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/myapp/urls.py b/myapp/urls.py
new file mode 100644
index 0000000..7f5cd7e
--- /dev/null
+++ b/myapp/urls.py
@@ -0,0 +1,11 @@
+from django.urls import path
+from . import views
+
+urlpatterns = [
+ path('', views.home, name='home'),
+ path('response/', views.response, name='response'),
+ path('roadmap/', views.roadmap, name='roadmap'),
+ path('test/', views.test, name='test'),
+
+
+]
diff --git a/myapp/views.py b/myapp/views.py
new file mode 100644
index 0000000..12ca1bb
--- /dev/null
+++ b/myapp/views.py
@@ -0,0 +1,228 @@
+from django.shortcuts import render
+from django.http import HttpResponse
+import google.generativeai as genai
+import os
+import pathlib
+from django.core.files.storage import FileSystemStorage
+from .helping_utils import text_formatter
+
+# response = model.generate_content("Ask 5 question abt deep learning to test my knowledge so you can hekp me accordingly give ques seprated by - nothin else.")
+
+
+API_KEY = 'AIzaSyDhfavnFBGdFw_p-GEsEmYYMZbovlV1WH4'
+genai.configure(api_key= API_KEY)
+
+model = genai.GenerativeModel("gemini-1.5-pro")
+
+def test(request):
+ if request.method == 'POST':
+ query = request.POST.get('search') # Get the search term from the HTML form
+ uploaded_file = request.FILES.get('file') # i have used get as file upload is optional
+
+ if (not uploaded_file) and (not query):
+ context = {
+ 'popup' : True
+ }
+ return render(request, 'home.html', context)
+
+
+ # complete beginner section
+ if uploaded_file:
+ # Get the root directory of the project
+ root_directory = pathlib.Path(__file__).parents[1] # Root directory of your Django project
+
+ # Save the file in the root directory
+ filename = uploaded_file.name
+ file_path = os.path.join(root_directory, filename)
+
+ # Save file using FileSystemStorage
+ with open(file_path, 'wb+') as destination:
+ for chunk in uploaded_file.chunks():
+ destination.write(chunk)
+
+ query = None
+
+ sample_pdf = genai.upload_file(file_path) #media / file_url)
+ response = model.generate_content(["read this pdf file and generate a quiz of upto 7-9 mcqs display your output on my html page after each quiz question put a small button clicking which its answer should be shown", sample_pdf])
+
+ else:
+ response = model.generate_content(f"generate a quiz of upto 7-9 mcqs on topic {query} respond using html tags so i can display your output on my html page after each quiz question put a small button clicking which its answer should be shown")
+
+ txt = response.text
+ lst = list(txt.rpartition('```'))
+ txt = lst[0]
+ return render(request, 'quiz.html', {'results':[txt]})
+
+ else:
+ return render(request,'test.html')
+
+def roadmap(request):
+ if request.method == 'POST':
+ roadmap_text = request.POST.get('roadmap_text')
+ print(roadmap_text)
+ roadmap_lst = text_formatter(roadmap_text)
+ print(roadmap_lst)
+
+ return render(request, 'roadmap.html', {'roadmap' : [''.join(roadmap_lst)]})
+ else:
+ return render(request, 'home.html',{'popup':None})
+
+# Create your views here.
+def response(request):
+ if request.method == 'POST':
+ query = request.POST.get('query') # Get the search term from the HTML form
+ dictt = request.POST.get('questions')
+ uploaded_file_path = request.POST.get('file')
+
+ # print(f"DICTIONARY : {type(dictt)}")
+ dictt = eval(dictt)
+ questions = dictt.values()
+ answers = []
+ for i in dictt:
+ answers.append(request.POST.get(f'question{i}'))
+
+
+ # print(f"QUESTIONS : {questions}")
+ # print(f'ANSWERS : {answers}')
+ # print(f'QUERY : {query}')
+
+ # for i in dictt:
+ print(f'UPLOADED IN REPONSE : {uploaded_file_path}')
+
+ if uploaded_file_path:
+
+ sample_pdf = genai.upload_file(uploaded_file_path) #media / file_url)
+ # response = model.generate_content([f"You are a teacher and this is a pdf file that a student is not able to understand , so you asked the student some questions : {questions} and here's how he/she responded : {answers} now just explain the pdf Dont talk anything about how to explain or how student responded.", sample_pdf])
+ response = model.generate_content([f"I will provide you with a set of questions, their corresponding answers, and a PDF document related to the topic. Your task is to understand the students knowledge based on their answers, then explain the content of the PDF in a way the student can understand, Questions: {questions} Answers: {answers} respond using html tags so i can display your output on my html page", sample_pdf])
+ else:
+ # response = model.generate_content(f"These are the questions i asked user : {questions} and these are answers givenby user: {answers} now judge the knowledge of user and accordingly explain about {query} this response will be given to user so write accordingly")
+ response = model.generate_content(f"You are a teacher and These are the questions you asked your student to test their knowledge so you can accordingly explain them about {query} : {questions} and these are answers given by student: {answers} now according to knowledge of your student explain about {query} respond using html tags so i can display your output on my html page")
+
+ roadmap_response = model.generate_content(f"this is the response you gave to me for learning : {response.text}, also generate a roadmap for me and use html tags in your response so i can show the results on my html page")
+ print(f"ROADMAP : {roadmap_response.text}")
+
+ txt = response.text
+ # print(txt)
+ lst = text_formatter(txt)
+ # lst[1] = '
'
+
+ # You can now process the query (e.g., search in the database)
+ context = {
+ 'query': query,
+ 'results': [' '.join(lst)], # Dummy results for now
+ 'roadmap_text' : roadmap_response.text
+ }
+ return render(request, 'response.html', context)
+ else:
+ return render(request, 'home.html',{'popup':None})
+
+def home(request):
+ if request.method == 'POST':
+ # HANDLING THE SEARCH
+ query = request.POST.get('search') # Get the search term from the HTML form
+ beginner = request.POST.get('beginner')
+ print(f"BEGIN : {beginner}")
+ uploaded_file = request.FILES.get('file') # i have used get as file upload is optional
+
+
+ if (not uploaded_file) and (not query):
+ context = {
+ 'popup' : True
+ }
+ return render(request, 'home.html', context)
+
+
+ if beginner:
+ # complete beginner section
+ if uploaded_file:
+ # Get the root directory of the project
+ root_directory = pathlib.Path(__file__).parents[1] # Root directory of your Django project
+
+ # Save the file in the root directory
+ filename = uploaded_file.name
+ file_path = os.path.join(root_directory, filename)
+
+ # Save file using FileSystemStorage
+ with open(file_path, 'wb+') as destination:
+ for chunk in uploaded_file.chunks():
+ destination.write(chunk)
+
+ query = None
+
+ sample_pdf = genai.upload_file(file_path) #media / file_url)
+ response = model.generate_content(["You are a teacher and this is a pdf file that a student is not able to understand as he i a complete beginner so read the pdf and explain him respond using html tags so i can display your output on my html page", sample_pdf])
+
+ else:
+ response = model.generate_content(f"You are a teacher and your student is a complete beginner and dont know about {query} now accordingly explain about {query} to your student respond using html tags so i can display your output on my html page")
+
+ roadmap_response = model.generate_content(f"this is the response you gave to me for learning : {response.text}, also generate a roadmap for me and use html tags in your response so i can show the results on my html page")
+ print(f"ROADMAP : {roadmap_response.text}")
+
+ lst = text_formatter(response.text)
+
+ context = {
+ 'query': query,
+ 'results': [' '.join(lst)], # Dummy results for now
+ 'roadmap_text' : roadmap_response.text,
+ }
+
+ return render(request, 'response.html', context)
+
+ ## HANDLING THE FILES
+ # Save file using FileSystemStorage
+ if uploaded_file:
+ # Get the root directory of the project
+ root_directory = pathlib.Path(__file__).parents[1] # Root directory of your Django project
+
+ # Save the file in the root directory
+ filename = uploaded_file.name
+ file_path = os.path.join(root_directory, filename)
+
+ # Save file using FileSystemStorage
+ with open(file_path, 'wb+') as destination:
+ for chunk in uploaded_file.chunks():
+ destination.write(chunk)
+
+ query = None
+
+ print(f'file_path : {file_path}')
+ # print(f'UPLOADED FILES : {uploaded_file}')
+ # media = pathlib.Path(__file__).parents[1] / "third_party"
+
+ sample_pdf = genai.upload_file(file_path) #media / file_url)
+ response = model.generate_content(["You are a teacher and this is a pdf file that a student is not able to understand , read the pdf and ask the student 4 to 5 questions to know if the student have prerequisite knowledge to understand pdf and give ques seprated by <==> and give only ques not any other text and dont give numbering of questions.", sample_pdf])
+ # print(f'Final PDf response : {response.text}')
+
+ else:
+ file_path = None
+
+ response = model.generate_content(f"Ask 5 question abt {query} to test my knowledge so you can help me accordingly give ques seprated by <==> nothin else and don't give numbering of questions.")
+
+ # common preprcoessing for both rfile upload and topic asked
+ txt = response.text
+ txt = txt.replace('\n','')
+ lst = txt.split('<==>')
+ new_list = []
+ for i in lst:
+ if not (i == '' or i == ' '):
+ new_list.append(i)
+
+ lst = new_list
+ d = {}
+ for num, i in enumerate(lst):
+ d[num+1] = i
+ # d.pop(0)
+
+ # You can now process the query (e.g., search in the database)
+
+
+ context = {
+ 'query': query,
+ 'questions': d, # Dummy results for now
+ 'file_path' : file_path
+ }
+
+
+ return render(request, 'ques.html', context)
+ else:
+ return render(request, 'home.html', {'popup':None})
diff --git a/mysite/__init__.py b/mysite/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/mysite/__pycache__/__init__.cpython-312.pyc b/mysite/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..230f786
Binary files /dev/null and b/mysite/__pycache__/__init__.cpython-312.pyc differ
diff --git a/mysite/__pycache__/settings.cpython-312.pyc b/mysite/__pycache__/settings.cpython-312.pyc
new file mode 100644
index 0000000..b1b9fef
Binary files /dev/null and b/mysite/__pycache__/settings.cpython-312.pyc differ
diff --git a/mysite/__pycache__/urls.cpython-312.pyc b/mysite/__pycache__/urls.cpython-312.pyc
new file mode 100644
index 0000000..866ed0f
Binary files /dev/null and b/mysite/__pycache__/urls.cpython-312.pyc differ
diff --git a/mysite/__pycache__/wsgi.cpython-312.pyc b/mysite/__pycache__/wsgi.cpython-312.pyc
new file mode 100644
index 0000000..9fc829e
Binary files /dev/null and b/mysite/__pycache__/wsgi.cpython-312.pyc differ
diff --git a/mysite/asgi.py b/mysite/asgi.py
new file mode 100644
index 0000000..cd43f95
--- /dev/null
+++ b/mysite/asgi.py
@@ -0,0 +1,16 @@
+"""
+ASGI config for mysite 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/5.1/howto/deployment/asgi/
+"""
+
+import os
+
+from django.core.asgi import get_asgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
+
+application = get_asgi_application()
diff --git a/mysite/settings.py b/mysite/settings.py
new file mode 100644
index 0000000..8052340
--- /dev/null
+++ b/mysite/settings.py
@@ -0,0 +1,130 @@
+"""
+Django settings for mysite project.
+
+Generated by 'django-admin startproject' using Django 5.1.1.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/5.1/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/5.1/ref/settings/
+"""
+
+from pathlib import Path
+
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = Path(__file__).resolve().parent.parent
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'django-insecure-ke2^(3o_gxu34#w0rn5(15kh8je%-3sg&s^**%6=uwo%8(9^xd'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = ['.vercel.app', '127.0.0.1','learnallai.onrender.com',' 0.0.0.0 ']
+
+
+# Application definition
+
+INSTALLED_APPS = [
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'myapp',
+]
+
+MIDDLEWARE = [
+ '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 = 'mysite.urls'
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ '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 = 'mysite.wsgi.application'
+# WSGI_APPLICATION = 'mysite.wsgi.app'
+
+
+# Database
+# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': BASE_DIR / 'db.sqlite3',
+ }
+}
+
+
+# Password validation
+# https://docs.djangoproject.com/en/5.1/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/5.1/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/5.1/howto/static-files/
+
+# STATIC_URL = 'static/'
+# STATIC_URL = '/static/'
+
+import os
+STATIC_URL = '/static/'
+STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
+
+# Default primary key field type
+# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
+
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
diff --git a/mysite/urls.py b/mysite/urls.py
new file mode 100644
index 0000000..a2e7835
--- /dev/null
+++ b/mysite/urls.py
@@ -0,0 +1,24 @@
+"""
+URL configuration for mysite project.
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+ https://docs.djangoproject.com/en/5.1/topics/http/urls/
+Examples:
+Function views
+ 1. Add an import: from my_app import views
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
+Class-based views
+ 1. Add an import: from other_app.views import Home
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
+Including another URLconf
+ 1. Import the include() function: from django.urls import include, path
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
+"""
+from django.contrib import admin
+from django.urls import path, include
+
+urlpatterns = [
+ path('admin/', admin.site.urls),
+ path('', include('myapp.urls')), # Include app URLs
+
+]
diff --git a/mysite/wsgi.py b/mysite/wsgi.py
new file mode 100644
index 0000000..b647c51
--- /dev/null
+++ b/mysite/wsgi.py
@@ -0,0 +1,7 @@
+import os
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
+
+application = get_wsgi_application()
+app = application
\ No newline at end of file
diff --git a/poetry.lock b/poetry.lock
new file mode 100644
index 0000000..d3d3248
--- /dev/null
+++ b/poetry.lock
@@ -0,0 +1,66 @@
+# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
+
+[[package]]
+name = "asgiref"
+version = "3.8.1"
+description = "ASGI specs, helper code, and adapters"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "asgiref-3.8.1-py3-none-any.whl", hash = "sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47"},
+ {file = "asgiref-3.8.1.tar.gz", hash = "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590"},
+]
+
+[package.extras]
+tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"]
+
+[[package]]
+name = "django"
+version = "5.1.1"
+description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design."
+optional = false
+python-versions = ">=3.10"
+files = [
+ {file = "Django-5.1.1-py3-none-any.whl", hash = "sha256:71603f27dac22a6533fb38d83072eea9ddb4017fead6f67f2562a40402d61c3f"},
+ {file = "Django-5.1.1.tar.gz", hash = "sha256:021ffb7fdab3d2d388bc8c7c2434eb9c1f6f4d09e6119010bbb1694dda286bc2"},
+]
+
+[package.dependencies]
+asgiref = ">=3.8.1,<4"
+sqlparse = ">=0.3.1"
+tzdata = {version = "*", markers = "sys_platform == \"win32\""}
+
+[package.extras]
+argon2 = ["argon2-cffi (>=19.1.0)"]
+bcrypt = ["bcrypt"]
+
+[[package]]
+name = "sqlparse"
+version = "0.5.1"
+description = "A non-validating SQL parser."
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "sqlparse-0.5.1-py3-none-any.whl", hash = "sha256:773dcbf9a5ab44a090f3441e2180efe2560220203dc2f8c0b0fa141e18b505e4"},
+ {file = "sqlparse-0.5.1.tar.gz", hash = "sha256:bb6b4df465655ef332548e24f08e205afc81b9ab86cb1c45657a7ff173a3a00e"},
+]
+
+[package.extras]
+dev = ["build", "hatch"]
+doc = ["sphinx"]
+
+[[package]]
+name = "tzdata"
+version = "2024.2"
+description = "Provider of IANA time zone data"
+optional = false
+python-versions = ">=2"
+files = [
+ {file = "tzdata-2024.2-py2.py3-none-any.whl", hash = "sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd"},
+ {file = "tzdata-2024.2.tar.gz", hash = "sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc"},
+]
+
+[metadata]
+lock-version = "2.0"
+python-versions = "^3.12"
+content-hash = "319a0ba62510a6c5bc6f5a861990a2bf9a827331daa8563ce5d8dcf426fefd39"
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..47b91a4
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,15 @@
+[tool.poetry]
+name = "again hackathon"
+version = "0.1.0"
+description = ""
+authors = ["Your Name "]
+readme = "README.md"
+
+[tool.poetry.dependencies]
+python = "^3.12"
+django = "^5.1.1"
+
+
+[build-system]
+requires = ["poetry-core"]
+build-backend = "poetry.core.masonry.api"
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..3a7dbf4
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,6 @@
+asgiref==3.8.1 ;
+django==5.1.1 ;
+sqlparse==0.5.1 ;
+tzdata==2024.2 ;
+google-generativeai == 0.8.2;
+gunicorn==23.0.0
diff --git a/vercel.json b/vercel.json
new file mode 100644
index 0000000..7c24a9f
--- /dev/null
+++ b/vercel.json
@@ -0,0 +1,12 @@
+
+{
+ "builds": [
+ { "src": "mysite/wsgi.py", "use": "@vercel/python" },
+ { "src": "staticfiles/**/*", "use": "@vercel/static" }
+ ],
+ "routes": [
+ { "src": "/static/(.*)", "dest": "/staticfiles/$1" },
+ { "src": "(.*)", "dest": "mysite/wsgi.py" }
+ ]
+ }
+
\ No newline at end of file