Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions Quantumcoders/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# CASAhackathon
**Team Name** - Quantum coders

**Problem Statement** - AI enhanced retail shopping

**Team Leader Email** - [email protected]

**A Brief of the Prototype:**

Chief AI Shopping Assistant (CASA) is a proactive shopping companion featuring learning adaptation, tailoring each user's experience by continuously adapting to evolving preferences. It also provides Instore analysis and helps with visual merchandising.
It will help us track deadzones in the store. The analysis will be displayed on a dashboard which contain Customer gaze analysis, Foot traffic, User Interaction with products. It will also helps in predicting the sales and keep up with the trends.
Our online assistant powered by LLM will provide suggestions based on items in the cart, user preferences and user profile. It also provides a chat interface to have a back and forth conversation to help the user figure out their fashion needs.

**Instore flow:**

![image](https://github.com/no-one-really/CASAhackathon/assets/58998511/5494b8b6-9bb9-42a1-834f-4e100f03e433)

**Online recommendation flow:**

![image](https://github.com/no-one-really/CASAhackathon/assets/58998511/397447e0-285b-45a1-9fa5-a7e5f60f3c9e)


**Tech Stack:**

![image](https://github.com/no-one-really/CASAhackathon/assets/58998511/1b3c9f27-1c66-4756-85f7-afc8548398b1)


**Step-by-Step Code Execution Instructions:**

Step 1: Install requirements
```pip install - requirements.txt```

Step2:
Host the Django server by runnning python manage.py runserver

Step3:
setup ngrok https://ngrok.com/docs/getting-started/

Step4:
delpoy the model by running start.js, serv.py and recieve.py

**Future Scope:**

To integrate Large Language-and-Vision Assistants to provide better shopping assistance and gain better insights on the customer needs

Empty file added Quantumcoders/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions Quantumcoders/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions Quantumcoders/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class ShopConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "shop"
16 changes: 16 additions & 0 deletions Quantumcoders/asgi.py
Original file line number Diff line number Diff line change
@@ -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/4.2/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()
Empty file added Quantumcoders/db.sqlite3
Empty file.
22 changes: 22 additions & 0 deletions Quantumcoders/manage.py
Original file line number Diff line number Diff line change
@@ -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()
3 changes: 3 additions & 0 deletions Quantumcoders/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
126 changes: 126 additions & 0 deletions Quantumcoders/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
"""
Django settings for mysite project.

Generated by 'django-admin startproject' using Django 4.2.7.

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


# 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-4z=&32ebvzt6&%&%#fx_%g)n-@@qj)strt-m^!vnr39!bzv^yt"

# 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",
]

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": [os.path.join(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 = "mysite.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')]
STATIC_ROOT = os.path.join(BASE_DIR,"assets")

# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
3 changes: 3 additions & 0 deletions Quantumcoders/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
10 changes: 10 additions & 0 deletions Quantumcoders/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.urls import path

from . import views

urlpatterns =[
path("", views.home, name="home"),
path("casa", views.casa, name="casa"),
path("cart", views.cart, name="cart"),
path("test12", views.test12, name="test12"),
]
43 changes: 43 additions & 0 deletions Quantumcoders/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from django.shortcuts import render
from django.http import HttpResponse

shplist=["T-shirt Contrast Pocket","Basic Flowing Scarf"]
rcmdlist=["black shoe","Basic Flowing Scarf"]

itemDescription={"T-shirt Contrast Pocket":['$30','static/img/shopping-cart/cart-1.jpg'],"Basic Flowing Scarf":["$47.00","static/img/shopping-cart/cart-3.jpg"],
"black shoe":["$32.50","static/img/shopping-cart/cart-2.jpg"]}
fullDetail=[]
for it in shplist:
currlst=[]
currlst.append(it)
for jk in itemDescription[it]:
currlst.append(jk)
fullDetail.append(currlst)
rcdflist=[]
for it in rcmdlist:
currlst=[]
currlst.append(it)
for jk in itemDescription[it]:
currlst.append(jk)
rcdflist.append(currlst)

# Create your views here.
def home(request):
return render(request,'index.html')

def casa(request):
return render(request,'tgg.html')

def cart(request):
return render(request,'shopping-cart.html',{"lst":fullDetail,"rlst":rcdflist})





# @register.filter
# def get_index(lst, i):
# return lst[i]

def test12(request):
return render(request,"test12.html",{"lst":shplist,"rlst":rcdflist})
16 changes: 16 additions & 0 deletions Quantumcoders/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for mysite 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", "mysite.settings")

application = get_wsgi_application()
Loading