Abdullah6395 commited on
Commit
616bff2
·
1 Parent(s): c8f5bee

added files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitignore +0 -0
  2. .python-version +1 -0
  3. __pycache__/algorithms.cpython-310.pyc +0 -0
  4. __pycache__/app.cpython-310.pyc +0 -0
  5. algorithms.py +77 -0
  6. answer_bank.npy +3 -0
  7. app.py +217 -0
  8. chatbot_tokenizer.pkl +3 -0
  9. customers.json +72 -0
  10. dockerfile +13 -0
  11. next_word.onnx +3 -0
  12. products.json +1 -0
  13. question_array.npy +3 -0
  14. requirements.txt +9 -0
  15. seller.json +1 -0
  16. sentiment_analysis.onnx +3 -0
  17. sentiment_tokens.json +0 -0
  18. static/css/Niche_style.css +41 -0
  19. static/css/add_product.css +25 -0
  20. static/css/chatbot.css +58 -0
  21. static/css/dashboard.css +46 -0
  22. static/css/login_style.css +36 -0
  23. static/css/product_panel.css +12 -0
  24. static/css/product_style.css +63 -0
  25. static/css/signup_style.css +53 -0
  26. static/css/welcome.css +24 -0
  27. static/images/3a6c895d2eb9558c10fc861443b50aee83be77f9_1630571642_fa17bf5b5a9d454788d5bf9f4360de87.png +0 -0
  28. static/images/3b6c02e7ac7285a9196e0bf6735568af26dc41e5_1618042275_f61ff47ae62f406a9e7fc93d3df3ebf3.png +0 -0
  29. static/images/3b76371c871b2774dbe1c35016da990dc3374ec1_1622095978_054e566afc0141558f371dc7409ef7d8.png +0 -0
  30. static/images/3bd342172c5971c8c804682b8febadad5663ebd4_1613568177_ae560918114949e99fec8aaaa230db4e.png +0 -0
  31. static/images/3c96ed04df221bd87b810732184f9be65e09be8e_1629543959_a841c137310246f7b3514c46aa7e0613.png +0 -0
  32. static/images/3cc8b4966a83b7582e035e09950836e63479450e_1620716085_49328cad06f74257aa4c22d22689146d.png +0 -0
  33. static/images/3cd02339fccadc5b18f358e0651bfcf8420325f3_1627363162_b066b67181dd4fc5b940b49eb84e6673.png +0 -0
  34. static/images/3cfa434132c3ad50a3f4cd6b6f7fd94050c03c4e_1630128966_4acf3f6da05742dbbc23627a81144f6d.png +0 -0
  35. static/images/3d5a097d815eaa08f3d507140e6b603ee634a41c_1628580918_f88a54bc60594456924e296bc6e8bbf2.png +0 -0
  36. static/images/3dea3c172d0407082d348f0ae7dba4eabeb3fe59_1629703734_9f72afe21ac04c408287e15dbe3aa543.png +0 -0
  37. static/images/3e3ccc0f17e593440e152473eee9c23942cc2770_1614160012_dfd6e29a5c8841f08ddffd3a62d000a5.png +0 -0
  38. static/images/Seller.png +0 -0
  39. static/images/chat.png +0 -0
  40. static/images/customer.png +0 -0
  41. static/images/error.png +0 -0
  42. static/images/gun.jpg +0 -0
  43. static/images/login.jpg +0 -0
  44. static/images/pro1.jpg +0 -0
  45. static/images/pro2.jpg +0 -0
  46. static/images/pro3.jpg +0 -0
  47. static/images/sales.png +0 -0
  48. templates/Niche.html +24 -0
  49. templates/Signup.html +29 -0
  50. templates/add_product.html +27 -0
.gitignore ADDED
File without changes
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.10
__pycache__/algorithms.cpython-310.pyc ADDED
Binary file (3.13 kB). View file
 
__pycache__/app.cpython-310.pyc ADDED
Binary file (6.81 kB). View file
 
algorithms.py ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import pickle
3
+ import json
4
+ from nltk.tokenize import word_tokenize
5
+ from nltk.stem import WordNetLemmatizer
6
+ import numpy as np
7
+ import nltk
8
+ import onnxruntime as rt
9
+ from sklearn.metrics.pairwise import cosine_similarity
10
+ nltk.download("punkt_tab")
11
+ def similar(a,b):
12
+ return np.linalg.matmul(a,b)/(np.linalg.norm(a)*np.linalg.norm(b))
13
+ def pred_next(text,how_many):
14
+ with open("tokenz_next_word.json") as file:
15
+ tokenizer=json.load(file)
16
+ file.close()
17
+ text=text.lower()
18
+ model=rt.InferenceSession("next_word.onnx",providers=["CPUExecutionProvider"])
19
+ for i in range(how_many):
20
+ tokens=[tokenizer[token] for token in text.split() if token in tokenizer.keys()]
21
+ length=len(tokens)
22
+ if length<=14:
23
+ paded=np.pad(tokens,(14-length,0))
24
+ else:
25
+ paded=tokens[:14]
26
+ index=np.argmax(model.run(['dense'],{"input":np.expand_dims(paded.astype(np.int32),axis=0)}))
27
+ word=list(tokenizer)[index+1]
28
+ text=text+" "+word
29
+ return text
30
+ def give_sentiment(text):
31
+ model=rt.InferenceSession('sentiment_analysis.onnx',providers=['CPUExecutionProvider'])
32
+ with open("sentiment_tokens.json") as file:
33
+ tokenizer=json.load(file)
34
+ file.close()
35
+ tokens=word_tokenize(text)
36
+ lemmatize=WordNetLemmatizer()
37
+ lemma_tokens=[lemmatize.lemmatize(word) for word in tokens]
38
+ vector=[tokenizer[word] for word in lemma_tokens if word in tokenizer.keys()]
39
+ if len(vector)<=100:
40
+ paded=np.pad(vector,(100-len(vector),0))
41
+ else:
42
+ paded=np.array(vector[:100])
43
+ vector=np.expand_dims(paded,axis=0)
44
+ try:
45
+ pred=model.run(['dense_32'],{"input":vector})
46
+ except Exception as e:
47
+ return 0
48
+ if pred[0][0][0]>0.5:
49
+ return 1
50
+ else:
51
+ return 0
52
+ def ChatWithMe(question):
53
+ with open("chatbot_tokenizer.pkl","rb") as file:
54
+ vectorize=pickle.load(file)
55
+ file.close()
56
+ sim=[]
57
+ answers=np.load("answer_bank.npy")
58
+ X=np.load("question_array.npy")
59
+ text=vectorize.transform([question])
60
+ text=text.toarray()
61
+ for ques in X:
62
+ sim.append(cosine_similarity(ques.reshape(1,-1),text))
63
+ if max(sim)<0.1:
64
+ return "I do not know about that"
65
+ else:
66
+ index=np.argmax(sim)
67
+ return answers[index]
68
+ def tell_vernelable(img):
69
+ model=rt.InferenceSession("vernelable_detect.onnx",providers=['CPUExecutionProvider'])
70
+ pred=model.run(['dense_2'],{"input":img})
71
+ if pred[0][0][0]>0.5:
72
+ return 1
73
+ else:
74
+ return 0
75
+
76
+
77
+
answer_bank.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ec2e052e67f8b8df4c68d6ad3aa5a97af7d95e370eea7a365ae932a453aad61
3
+ size 113132
app.py ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask,render_template,request,Response,jsonify,session,redirect,url_for
2
+ import numpy as np
3
+ from sklearn.metrics.pairwise import cosine_similarity
4
+ import matplotlib.pyplot as plt
5
+ import pandas as pd
6
+ import pickle
7
+ import os
8
+ import json
9
+ import re
10
+ from PIL import Image
11
+ import threading
12
+ import algorithms as alg
13
+ from io import BytesIO
14
+ app=Flask(__name__)
15
+ folder='static/images'
16
+ app.config["UPLOAD_FOLDER"]=folder
17
+ app.secret_key="mykey"
18
+ pair={}
19
+ def pred_ver_and_save_data(img,img_file,data,digit,name,vector,brand,desc,cat,price):
20
+ try:
21
+ ans=alg.tell_vernelable(img)
22
+ except Exception as e:
23
+ ans=0.000001
24
+ vector=list(vector)
25
+ if ans>0.5:
26
+ data[f"id{digit+1}"]={"name":name,"description":desc,"reviews":[],"clicks":0,"category":cat,"price":price,"brand":brand,"img":f"images/{img_file.filename}","vector":vector}
27
+ else:
28
+ data[f"id{digit+1}"]={"name":name,"description":desc,"reviews":[],"clicks":0,"category":cat,"price":price,"brand":brand,"img":'images/error.png',"vector":vector}
29
+ with open("products.json","w") as file:
30
+ json.dump(data,file)
31
+ file.close()
32
+ return 0
33
+ @app.route("/")
34
+ def page():
35
+ return render_template("index.html")
36
+ @app.route("/niche")
37
+ def niche():
38
+ return render_template("Niche.html")
39
+ @app.route("/product_panel/<product_id>",methods=["GET"])
40
+ def product_panel(product_id):
41
+ with open("products.json") as f:
42
+ data=json.load(f)
43
+ f.close()
44
+ vectors=[]
45
+ for ids in data:
46
+ vectors.append(data[ids]["vector"])
47
+ vect_arr=np.array(vectors)
48
+ to_compare=np.array(data[product_id]["vector"]).reshape(1,-1)
49
+ sim=[]
50
+ indexes=[]
51
+ rec={}
52
+ for vec in vect_arr:
53
+ sim.append(cosine_similarity(to_compare,vec.reshape(1,-1)))
54
+ sorted_sim=sorted(sim)[1:4]
55
+ for similar in sorted_sim:
56
+ indexes.append(sim.index(similar))
57
+ for i in indexes:
58
+ rec[list(data)[i]]=data[list(data)[i]]
59
+ return render_template("product_panel.html",product=data[product_id],rec_pro=rec)
60
+ @app.route("/products",methods=["GET"])
61
+ def products():
62
+ if 'user' not in session:
63
+ return redirect(url_for('login'))
64
+ with open("products.json") as f:
65
+ data=json.load(f)
66
+ f.close()
67
+ return render_template("products.html",products=data)
68
+ @app.route("/login",methods=['GET',"POST"])
69
+ def login():
70
+ if 'user' in session:
71
+ with open("products.json") as file:
72
+ data=json.load(file)
73
+ file.close()
74
+ return redirect(url_for('products',products=data))
75
+ if request.method=="POST":
76
+ with open("seller.json") as f:
77
+ data=json.load(f)
78
+ name=request.form['name']
79
+ password=request.form['password']
80
+ if name not in list(data):
81
+ return redirect(url_for("sign_up"))
82
+ elif password=="":
83
+ return render_template("login.html")
84
+ elif int(password) == data[name]['password']:
85
+ session['user']=name
86
+ with open("products.json") as f:
87
+ pro=json.load(f)
88
+ f.close()
89
+ return redirect(url_for("products",products=pro))
90
+ else:
91
+ return render_template("login.html")
92
+ else:
93
+ return render_template("login.html")
94
+ @app.route("/sign_up",methods=["GET","POST"])
95
+ def sign_up():
96
+ if "user" in session:
97
+ with open("products.json") as f:
98
+ data=json.load(f)
99
+ f.close()
100
+ return redirect(url_for("products.html",products=data))
101
+ if request.method=="GET":
102
+ return render_template("Signup.html")
103
+ else:
104
+ with open("seller.json") as f:
105
+ data=json.load(f)
106
+ f.close()
107
+ name=request.form['name']
108
+ if name in list(data):
109
+ return redirect(url_for("login"))
110
+ else:
111
+ session['user']=name
112
+ password=request.form['confirm']
113
+ data[name]={"password":int(password),"products":[],"reviews":[]}
114
+ with open("seller.json","w") as f:
115
+ json.dump(data,f)
116
+ f.close()
117
+ return redirect(url_for("niche"))
118
+ @app.route("/graph")
119
+ def graph():
120
+ with open("seller.json") as file:
121
+ data=json.load(file)
122
+ file.close()
123
+ a=[]
124
+ reviews=data['username1']['reviews']
125
+ for review in reviews:
126
+ sentiment=alg.give_sentiment(review)
127
+ a.append(sentiment)
128
+ df=pd.Series(a)
129
+ df=df.replace({1:"positive",0:"negative"})
130
+ data=df.value_counts()
131
+ fig,ax=plt.subplots()
132
+ data.plot(kind="bar" ,ax=ax)
133
+ plt.xlabel("review sentiment")
134
+ plt.ylabel("no of reviews")
135
+ plt.xticks(rotation=0)
136
+ img=BytesIO()
137
+ fig.savefig(img,format="png")
138
+ img.seek(0)
139
+ return Response(img, mimetype='image/png')
140
+ @app.route("/seller",methods=["GET","POST"])
141
+ def seller():
142
+ with open("seller.json") as file:
143
+ seller=json.load(file)
144
+ file.close()
145
+ reviews=seller[session['user']]['reviews']
146
+ products=seller[session['user']]['products']
147
+ with open("products.json") as file:
148
+ prod=json.load(file)
149
+ file.close()
150
+ return render_template("seller_dashboard.html",product=prod,ids=products,reviews=reviews)
151
+ @app.route("/tell",methods=['POST',"GET"])
152
+ def tell():
153
+ if request.method=="GET":
154
+ return render_template("add_product.html")
155
+ else:
156
+ img_file=request.files["image"]
157
+ image_data=img_file.read()
158
+ img=Image.open(BytesIO(image_data))
159
+ img=np.expand_dims(np.array(img.resize((256,256))).astype(np.float32)/255,axis=0)
160
+ image_path=os.path.join(app.config['UPLOAD_FOLDER'],img_file.filename)
161
+ img_file.save(image_path)
162
+ with open("products.json") as file:
163
+ data=json.load(file)
164
+ file.close()
165
+ last=list(data.keys())[-1]
166
+ digit=int("".join(re.findall(r"\d",last)))
167
+ name=request.form["name"]
168
+ cat=request.form["category"]
169
+ desc=request.form["description"]
170
+ brand=request.form["brand"]
171
+ price=request.form['price']
172
+ vector=name+" "+brand+" "+desc
173
+ with open("tokenize_description.pkl","rb") as file:
174
+ tokenizer=pickle.load(file)
175
+ file.close()
176
+ with open("seller.json") as file:
177
+ seller=json.load(file)
178
+ file.close()
179
+ new_product_id = f"id{digit+1}"
180
+ if new_product_id not in seller[session['user']]["products"]:
181
+ seller[session['user']]["products"].append(new_product_id)
182
+ with open("seller.json","w") as file:
183
+ json.dump(seller,file)
184
+ file.close()
185
+ seq=[tokenizer.word_index[word] for word in vector.split() if word in tokenizer.word_index]
186
+ if len(seq)<=22:
187
+ vector=np.pad(seq,(22-len(seq),0))
188
+ else:
189
+ vector=np.array(vector[:22])
190
+ threading.Thread(target=pred_ver_and_save_data,args=(img,img_file,data,digit,name,vector,brand,desc,cat,price)).start()
191
+ return render_template("seller_dashboard.html",ids=seller[session['user']]["products"][:-1],product=data,reviews=seller[session['user']]["reviews"])
192
+ @app.route("/chatbot",methods=["GET","POST"])
193
+ def chatbot():
194
+ if request.method=="GET":
195
+ return render_template("chatwindow.html",chat=pair)
196
+ else:
197
+ question=request.form['question']
198
+ question=question.lower()
199
+ ans=alg.ChatWithMe(question)
200
+ pair[question]=ans
201
+ return render_template("chatwindow.html",chat=pair)
202
+ @app.route("/predict", methods=["POST","GET"])
203
+ def predict():
204
+ if request.method=="POST":
205
+ data = request.json
206
+ input_text = data.get("text", "")
207
+ sugg=alg.pred_next(input_text,1)
208
+ return jsonify({"suggestions": [sugg]})
209
+ else:
210
+ return render_template("products.html")
211
+ if __name__=="__main__":
212
+ app.run(debug=True)
213
+
214
+
215
+
216
+
217
+
chatbot_tokenizer.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09ee9ab5af6991aa006c35d16dd9ee0728c0f25d38b762974fd5e2be216b927e
3
+ size 5360
customers.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "username1": {
3
+ "password": 123,
4
+ "products": [1000, 1001, 1002, 1003],
5
+ "category": {"clothing": 10, "electronics": 20, "shoes": 5},
6
+ "time on website": {"session1": 10, "session2": 20, "session3": 15, "session4": 30},
7
+ "clicks": {"prod_1000": 8, "prod_1001": 5, "prod_150": 10, "prod_220": 5},
8
+ "balance": 2000,
9
+ "reviews": {
10
+ "prod_1000": "Great quality, highly recommend!",
11
+ "prod_1001": "Very comfortable but the color faded after one wash.",
12
+ "prod_1002": "Not satisfied with the product. It broke within a week.",
13
+ "prod_1003": "Amazing value for money!"
14
+ }
15
+ },
16
+ "username2": {
17
+ "password": 456,
18
+ "products": [1010, 1015, 1020, 1025],
19
+ "category": {"clothing": 5, "electronics": 15, "shoes": 8},
20
+ "time on website": {"session1": 25, "session2": 30, "session3": 10, "session4": 20, "session5": 18},
21
+ "clicks": {"prod_1010": 6, "prod_1015": 7, "prod_180": 12, "prod_275": 8},
22
+ "balance": 1500,
23
+ "reviews": {
24
+ "prod_1010": "The fit was perfect, but the stitching came loose after a few wears.",
25
+ "prod_1015": "Worth the price, but arrived later than expected.",
26
+ "prod_1020": "Very durable and stylish, exactly what I needed.",
27
+ "prod_1025": "Good value, though the material feels a bit cheap."
28
+ }
29
+ },
30
+ "username3": {
31
+ "password": 789,
32
+ "products": [1030, 1035, 1040, 1045],
33
+ "category": {"clothing": 8, "electronics": 18, "shoes": 6},
34
+ "time on website": {"session1": 15, "session2": 25, "session3": 20, "session4": 22},
35
+ "clicks": {"prod_1030": 9, "prod_1035": 6, "prod_190": 14, "prod_310": 6},
36
+ "balance": 2500,
37
+ "reviews": {
38
+ "prod_1030": "Really comfy shoes, but they run a bit large.",
39
+ "prod_1035": "Good product but could use better packaging.",
40
+ "prod_1040": "Not worth the price, expected better performance.",
41
+ "prod_1045": "Sleek design, feels premium, but a bit tight."
42
+ }
43
+ },
44
+ "username4": {
45
+ "password": 234,
46
+ "products": [1050, 1055, 1060, 1065],
47
+ "category": {"clothing": 12, "electronics": 10, "shoes": 9},
48
+ "time on website": {"session1": 30, "session2": 20, "session3": 15, "session4": 10, "session5": 12},
49
+ "clicks": {"prod_1050": 5, "prod_1055": 8, "prod_200": 7, "prod_330": 5},
50
+ "balance": 1800,
51
+ "reviews": {
52
+ "prod_1050": "Not comfortable, returns were easy though.",
53
+ "prod_1055": "Nice quality, would buy again.",
54
+ "prod_1060": "Decent product but not as described.",
55
+ "prod_1065": "Good value, the texture could be improved."
56
+ }
57
+ },
58
+ "username5": {
59
+ "password": 567,
60
+ "products": [1070, 1075, 1080, 1085],
61
+ "category": {"clothing": 6, "electronics": 22, "shoes": 4},
62
+ "time on website": {"session1": 20, "session2": 15, "session3": 18, "session4": 25, "session5": 30, "session6": 22},
63
+ "clicks": {"prod_1070": 7, "prod_1075": 6, "prod_210": 11, "prod_350": 9},
64
+ "balance": 2200,
65
+ "reviews": {
66
+ "prod_1070": "Stylish and comfortable, but not very durable.",
67
+ "prod_1075": "The quality was better than I expected.",
68
+ "prod_1080": "Great sound, but could have been louder.",
69
+ "prod_1085": "Works as expected, but not exceptional."
70
+ }
71
+ }
72
+ }
dockerfile ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
+ WORKDIR /app
8
+
9
+ COPY --chown=user ./requirements.txt requirements.txt
10
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
+
12
+ COPY --chown=user . /app
13
+ CMD ["gunicorn","-b","0.0.0.0:7860","app:app"]
next_word.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd61900436f6fe10be567b198a02a56f970242e7a80570f28b2e8bca90182a9a
3
+ size 1297135
products.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"id1": {"name": "goat milk whitening soap", "description": "A gentle soap enriched with goat milk to nourish and brighten skin, perfect for sensitive skin types.", "reviews": ["nice product", "very soothing on the skin", "good for sensitive skin"], "clicks": 50, "category": "cosmetics", "price": 2000, "brand": "lux", "img": "images/3e3ccc0f17e593440e152473eee9c23942cc2770_1614160012_dfd6e29a5c8841f08ddffd3a62d000a5.png", "vector": [15, 16, 44, 17, 12, 2, 45, 17, 46, 4, 15, 16, 5, 47, 1, 18, 3, 48, 19, 49, 3, 50]}, "id2": {"name": "luxury face cream", "description": "A premium face cream that hydrates and smoothens skin with high-quality ingredients for a radiant look.", "reviews": ["great texture, works well", "my skin feels smoother", "expensive but worth it"], "clicks": 75, "category": "cosmetics", "price": 3500, "brand": "lux", "img": "images/3dea3c172d0407082d348f0ae7dba4eabeb3fe59_1629703734_9f72afe21ac04c408287e15dbe3aa543.png", "vector": [0, 20, 7, 8, 12, 2, 51, 7, 8, 9, 52, 1, 53, 3, 4, 54, 55, 21, 19, 2, 56, 57]}, "id3": {"name": "organic hair serum", "description": "A nourishing hair serum made with organic ingredients to promote shine and reduce frizz.", "reviews": ["not as effective as expected", "it made my hair shinier", "too oily for my hair type"], "clicks": 45, "category": "haircare", "price": 1500, "brand": "lux", "img": "images/3d5a097d815eaa08f3d507140e6b603ee634a41c_1628580918_f88a54bc60594456924e296bc6e8bbf2.png", "vector": [0, 0, 0, 0, 10, 22, 6, 12, 2, 58, 22, 6, 59, 4, 10, 21, 5, 60, 61, 1, 23, 62]}, "id4": {"name": "shea butter body lotion", "description": "A deeply moisturizing body lotion infused with shea butter to keep skin soft and hydrated.", "reviews": ["very moisturizing", "perfect for dry skin", "smells amazing"], "clicks": 60, "category": "cosmetics", "price": 1200, "brand": "care", "img": "images/3cfa434132c3ad50a3f4cd6b6f7fd94050c03c4e_1630128966_4acf3f6da05742dbbc23627a81144f6d.png", "vector": [0, 0, 24, 25, 26, 27, 11, 2, 28, 63, 26, 27, 29, 4, 24, 25, 5, 64, 3, 30, 1, 65]}, "id5": {"name": "charcoal detox mask", "description": "A purifying face mask with activated charcoal to remove toxins and deeply cleanse pores.", "reviews": ["clears pores, refreshing", "great for oily skin", "a bit too drying for my skin"], "clicks": 85, "category": "skincare", "price": 1800, "brand": "care", "img": "images/3cd02339fccadc5b18f358e0651bfcf8420325f3_1627363162_b066b67181dd4fc5b940b49eb84e6673.png", "vector": [0, 0, 0, 0, 31, 66, 32, 11, 2, 67, 7, 32, 4, 68, 31, 5, 69, 70, 1, 28, 71, 72]}, "id6": {"name": "anti-aging serum", "description": "A powerful anti-aging serum that reduces fine lines and improves skin elasticity over time.", "reviews": ["good results after a few weeks", "skin feels tighter", "didn't see any major changes"], "clicks": 40, "category": "skincare", "price": 2500, "brand": "care", "img": "images/3cc8b4966a83b7582e035e09950836e63479450e_1620716085_49328cad06f74257aa4c22d22689146d.png", "vector": [0, 0, 0, 33, 34, 6, 11, 2, 73, 33, 34, 6, 9, 74, 75, 76, 1, 77, 3, 78, 79, 80]}, "id7": {"name": "organic aloe vera gel", "description": "A pure and organic aloe vera gel that soothes irritated skin and provides deep hydration.", "reviews": ["soothing and natural", "great for sunburns", "a bit too sticky for my liking"], "clicks": 95, "category": "skincare", "price": 800, "brand": "care", "img": "images/3c96ed04df221bd87b810732184f9be65e09be8e_1629543959_a841c137310246f7b3514c46aa7e0613.png", "vector": [0, 0, 10, 35, 36, 37, 11, 2, 81, 1, 10, 35, 36, 37, 9, 82, 83, 3, 1, 84, 85, 86]}, "id8": {"name": "rose water facial spray", "description": "A refreshing facial mist infused with rose water to revitalize and tone the skin.", "reviews": ["refreshing, smells amazing", "perfect for summer", "needs more hydration"], "clicks": 50, "category": "cosmetics", "price": 900, "brand": "hashmi", "img": "images/3bd342172c5971c8c804682b8febadad5663ebd4_1613568177_ae560918114949e99fec8aaaa230db4e.png", "vector": [0, 0, 0, 38, 39, 40, 87, 13, 2, 88, 40, 89, 29, 4, 38, 39, 5, 90, 1, 91, 14, 3]}, "id9": {"name": "vitamin C face serum", "description": "A lightweight serum with vitamin C to brighten the skin and reduce dark spots.", "reviews": ["brightens skin tone", "absorbs quickly", "left my skin feeling sticky"], "clicks": 60, "category": "skincare", "price": 2200, "brand": "hashmi", "img": "images/3b76371c871b2774dbe1c35016da990dc3374ec1_1622095978_054e566afc0141558f371dc7409ef7d8.png", "vector": [0, 0, 0, 41, 42, 7, 6, 13, 2, 92, 6, 4, 41, 42, 5, 18, 14, 3, 1, 23, 93, 94]}, "id10": {"name": "luxury hand cream", "description": "A rich and hydrating hand cream that keeps hands soft and moisturized throughout the day.", "reviews": ["softens hands instantly", "perfect for winter", "a bit too thick for my liking"], "clicks": 30, "category": "cosmetics", "price": 1400, "brand": "hashmi", "img": "images/3b6c02e7ac7285a9196e0bf6735568af26dc41e5_1618042275_f61ff47ae62f406a9e7fc93d3df3ebf3.png", "vector": [0, 0, 0, 20, 43, 8, 13, 2, 95, 1, 96, 43, 8, 9, 97, 98, 30, 1, 99, 100, 14, 101]}}
question_array.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2d91aa5252faa358c13e17e5208d7a227425b45444d0dbefd6bf693b1d57e04
3
+ size 256064
requirements.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ onnxruntime
2
+ io
3
+ scikit-learn
4
+ matplotlib
5
+ pandas
6
+ numpy
7
+ flask
8
+ nltk
9
+ Pillow
seller.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"username1": {"password": 123, "products": ["id1"], "reviews": ["this product is useless", "you are worst", "quality is poor", "not worth the price", "delivered late", "item damaged", "waste of money", "terrible experience", "not recommended", "customer service is bad"]}, "username2": {"password": 123, "products": ["id2"], "reviews": ["amazing quality", "not worth the price", "fast shipping", "great product", "superb quality", "perfect as described", "worth every penny", "customer service was helpful", "highly recommended", "would buy again"]}, "username3": {"password": 123, "products": ["id3"], "reviews": ["fast delivery", "poor packaging", "product arrived broken", "not what I expected", "color is different", "overpriced", "excellent quality", "customer service ignored me", "works perfectly", "great buy"]}, "username4": {"password": 123, "products": ["id4"], "reviews": ["great value for money", "never buying again", "loved it", "very stylish", "does not match description", "cheap material", "exactly what I needed", "highly durable", "better than expected", "shipping was slow"]}, "username5": {"password": 123, "products": ["id5"], "reviews": ["product exceeded expectations", "color is different than shown", "worth the money", "not as advertised", "great product", "customer service was unhelpful", "high quality", "defective item", "came with missing parts", "fantastic experience"]}, "username6": {"password": 123, "products": ["id6"], "reviews": ["would recommend", "terrible customer service", "fantastic purchase", "superb build quality", "not happy with the product", "too expensive", "great performance", "came in excellent packaging", "return process was easy", "item was different from the picture"]}, "username7": {"password": 123, "products": ["id7"], "reviews": ["excellent packaging", "item missing", "shipping was too slow", "love this product", "not as described", "completely broken on arrival", "exactly what I wanted", "very poor material", "well-designed product", "not worth the money"]}, "username8": {"password": 123, "products": ["id8"], "reviews": ["satisfied with the purchase", "too expensive", "great customer service", "did not work as expected", "very high quality", "delivery was quick", "the item is fantastic", "superb craftsmanship", "not durable", "looks cheap"]}, "username9": {"password": 123, "products": ["id9"], "reviews": ["not as described", "arrived late", "works fine", "completely disappointed", "best product I ever bought", "size is incorrect", "colors are vibrant", "not a good experience", "highly recommended", "worst purchase ever"]}, "username10": {"password": 123, "products": ["id10"], "reviews": ["absolutely love it", "not working", "excellent quality", "money well spent", "received wrong item", "customer service was great", "superb value", "totally unreliable", "fast shipping", "best purchase ever"]}, "abdullah": {"password": 123, "products": [], "reviews": []}}
sentiment_analysis.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dcb811f09877a75ef546c5a2f6312aa8f6409d8270a24cc2fdf69bc5519c66a2
3
+ size 620681
sentiment_tokens.json ADDED
The diff for this file is too large to render. See raw diff
 
static/css/Niche_style.css ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body{
2
+ display: flex;
3
+ justify-content: center;
4
+ background-color: rgb(93, 93, 249);
5
+ }
6
+ .Entry{
7
+ border:5px solid blueviolet;
8
+ background-color: aquamarine;
9
+ text-align: center;
10
+ margin:auto;
11
+ margin-top:5%;
12
+ width: 500px;
13
+ height:400px;
14
+ border-radius: 20px;
15
+ }
16
+ .choice{
17
+ display: flex;
18
+ border: 2px solid black;
19
+ margin: auto;
20
+ background-color: white;
21
+ width:430px;
22
+ height:280px;
23
+ justify-content:space-evenly;
24
+ }
25
+ .Customer,.Seller{
26
+ margin-top: 60px;
27
+ width: 150px;
28
+ height:100px;
29
+ font-size: 30px;
30
+ }
31
+ .Seller:hover{
32
+ opacity:70%;
33
+ border:2px solid green;
34
+ }
35
+ .Customer:hover{
36
+ border:2px solid green;
37
+ opacity:70%;
38
+ }
39
+ h3{
40
+ margin:0%;
41
+ }
static/css/add_product.css ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .add{
2
+ display: flex;
3
+ flex-direction: column;
4
+ margin:auto;
5
+ width:400px;
6
+ height:500px;
7
+ padding:20px;
8
+ padding-top: 20px;
9
+ border: 7px solid blue;
10
+ border-radius: 20px;
11
+ margin-top: 50px;
12
+ }
13
+ .field{
14
+ margin-bottom:10px;
15
+ }
16
+ button{
17
+ border-radius: 20px;
18
+ width: 70px;
19
+ margin:auto;
20
+ background-image: linear-gradient(45deg,greenyellow,blue);
21
+ margin-top:10px;
22
+ }
23
+ body{
24
+ background-color: aqua;
25
+ }
static/css/chatbot.css ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #chatbox{
2
+ border-radius: 20px;
3
+ position:fixed;
4
+ border: 5px solid black;
5
+ bottom: 20px;
6
+ left: 5px;
7
+ right: 5%;
8
+ height:50px ;
9
+ font-size: larger;
10
+ }
11
+ .welcome{
12
+ text-align: center;
13
+ margin-top: 15%;
14
+ font-size: 30px;
15
+ }
16
+ #send{
17
+ position: fixed;
18
+ border-radius: 20px;
19
+ font-size: larger;
20
+ bottom: 25px;
21
+ left:95%;
22
+ background-color: black;
23
+ color: white;
24
+ width: 70px;
25
+ height: 50px;
26
+ }
27
+ .question{
28
+ width:200px;
29
+ height:100px;
30
+ background-color: rgb(147, 147, 141);
31
+ border-radius: 20px;
32
+ padding: 20px;
33
+ margin-bottom: 10px;
34
+ }
35
+ .answer{
36
+ width:200px;
37
+ height:100px;
38
+ overflow-y: scroll;
39
+ background-color: greenyellow;
40
+ border-radius: 20px;
41
+ padding: 20px;
42
+ }
43
+ .answer::-webkit-scrollbar{
44
+ width: 0;
45
+ }
46
+ .chat{
47
+ margin-bottom: 10px;
48
+ }
49
+ .chat_contain{
50
+ margin-bottom:80px;
51
+ }
52
+ #back{
53
+ width:100px;
54
+ height:40px;
55
+ border-radius: 20px;
56
+ background-color: blue;
57
+ color: white;
58
+ }
static/css/dashboard.css ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .analysis{
2
+ display: flex;
3
+ justify-content: space-between;
4
+ }
5
+ #sale{
6
+ margin-top: 70px;
7
+ }
8
+ .products{
9
+ display:flex;
10
+ flex-wrap: wrap;
11
+ }
12
+ h1{
13
+ text-align: center;
14
+ margin: auto;
15
+ }
16
+ .header{
17
+ display: flex;
18
+ justify-content: space-between;
19
+ }
20
+ button{
21
+ border-radius: 20px;
22
+ background-image: linear-gradient(45deg,rgb(128, 128, 177),rgb(72, 72, 139));
23
+ color:ghostwhite;
24
+ height:50px;
25
+ }
26
+ button:active{
27
+ background-image: linear-gradient(135deg,rgb(128, 128, 177),rgb(72, 72, 139));
28
+ }
29
+ button:hover{
30
+ box-shadow: 3px 2px burlywood;
31
+ }
32
+ .reviews{
33
+ display: flex;
34
+ flex-direction: column;
35
+ }
36
+ .review{
37
+ height:50px;
38
+ margin-bottom: 10px;
39
+ font-size: 30px;
40
+ background-color: antiquewhite;
41
+ padding: 30px;
42
+ border-radius: 10px;
43
+ }
44
+ h2{
45
+ font-size: 50px;
46
+ }
static/css/login_style.css ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .form{
2
+ display: flex;
3
+ flex-direction: column;
4
+ border:5px solid green;
5
+ border-radius: 20px;
6
+ padding: 20px;
7
+ width: 300px;
8
+ height: 300px;
9
+ margin: auto;
10
+ margin-top: 10%;
11
+ background-color: hsla(214, 85%, 5%, 0.3);
12
+
13
+ }
14
+ .element{
15
+ margin-bottom: 10px;
16
+ border-radius: 10px;
17
+ }
18
+ h1{
19
+ text-align: center;
20
+ }
21
+ button{
22
+ width: 70px;
23
+ height: 40px;
24
+ margin: auto;
25
+ background-image: linear-gradient(160deg,rgb(195, 146, 56),rgb(115, 115, 217));
26
+ }
27
+ button:hover{
28
+ background-image: linear-gradient(160deg,rgb(235, 177, 68),rgb(82, 82, 238));
29
+ margin-bottom: 13px;
30
+ box-shadow: inset;
31
+ }
32
+ body{
33
+ background-image: url("../images/login.jpg");
34
+ background-repeat: no-repeat;
35
+ background-size: 100%;
36
+ }
static/css/product_panel.css ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .recomendation{
2
+ display:flex;
3
+ flex-wrap: wrap;
4
+ }
5
+ .rec_prod{
6
+ width: 280px;
7
+ height:450px;
8
+ margin-left: 10px;
9
+ margin-bottom: 10px;
10
+ border: 1px solid wheat;
11
+ background-color: antiquewhite;
12
+ }
static/css/product_style.css ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .header{
2
+ display:flex;
3
+ justify-content: space-between;
4
+ overflow-x: scroll;
5
+ scrollbar-width: 2px;
6
+ }
7
+ .header::-webkit-scrollbar{
8
+ max-width: 0px;
9
+ }
10
+ .category{
11
+ border:2px solid black;
12
+ width:100px;
13
+ height:50px;
14
+ border-radius: 20px;
15
+ text-align: center;
16
+ padding: 20px;
17
+ margin:10px;
18
+ }
19
+ .category:hover{
20
+ background-color: aqua;
21
+ }
22
+ .head{
23
+ display: flex;
24
+ justify-content: space-between;
25
+ }
26
+ #searchBox{
27
+ width: 400px;
28
+ height: 50px;
29
+ font-size: 20px;
30
+ }
31
+ #suggestions{
32
+ width: 320px; border: 1px solid #ccc; display: none; position: absolute; background: white;
33
+ margin-left: 600px;
34
+ }
35
+ .but{
36
+ height: 30px;
37
+ border-radius: 10px;
38
+ background-image: linear-gradient(orange,pink);
39
+ }
40
+ .but:active{
41
+ box-shadow: 20px;
42
+ background-image: linear-gradient(pink,orange);
43
+ }
44
+ .Products{
45
+ display: flex;
46
+ flex-wrap: wrap;
47
+ }
48
+ .Product{
49
+ margin: 20px;
50
+ }
51
+ #chat_with_me{
52
+ position: fixed;
53
+ width: 100px;
54
+ height: 100px;
55
+ border-radius: 100px;
56
+ bottom: 20px;
57
+ right: 20px;
58
+ border:3px solid blue;
59
+ }
60
+ #chat_with_me:hover{
61
+ width: 105px;
62
+ height: 105px;
63
+ }
static/css/signup_style.css ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ form{
2
+ display:flex;
3
+ flex-direction: column;
4
+ width:400px;
5
+ height:350px;
6
+ border:2px solid black;
7
+ padding: 20px;
8
+ margin:auto;
9
+ border-radius: 20px;
10
+ margin-top: 10%;
11
+ background: hsla(214, 85%, 5%, 0.3);
12
+ }
13
+ .form{
14
+ margin-bottom: 4px;
15
+ }
16
+ input{
17
+ border-radius: 7px;
18
+ }
19
+ button{
20
+ border-radius: 10px;
21
+ width:70px;
22
+ margin-left:auto;
23
+ margin-right: auto;
24
+ margin-top: 20px;
25
+ background-image: linear-gradient(rgb(243, 126, 126),rgb(0, 68, 128));
26
+ }
27
+ body{
28
+ background: linear-gradient(90deg, aqua, blue, yellow, red, pink, orange);
29
+ background-size: 200% 200%;
30
+ animation:hello 20s infinite;
31
+ }
32
+ @keyframes hello{
33
+ 0% {
34
+ background-position: 0% 0%; /* Start position */
35
+ background-size: 150% 200%; /* Initial size */
36
+ }
37
+ 25% {
38
+ background-position: 50% 25%; /* Stream flows diagonally */
39
+ background-size: 160% 220%; /* Gradual expansion */
40
+ }
41
+ 50% {
42
+ background-position: 100% 50%; /* Moves to the right-center */
43
+ background-size: 180% 200%; /* Further expansion */
44
+ }
45
+ 75% {
46
+ background-position: 50% 75%; /* Stream flows back diagonally */
47
+ background-size: 160% 180%; /* Shrink a bit */
48
+ }
49
+ 100% {
50
+ background-position: 0% 100%; /* Loop back to the start */
51
+ background-size: 150% 200%; /* Reset size */
52
+ }
53
+ }
static/css/welcome.css ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .login,.signup{
2
+ border-radius: 20px;
3
+ background-color: blue;
4
+ color: azure;
5
+ font-size: 50px;
6
+ margin-top: 30px;
7
+ }
8
+ .buttons{
9
+ display: flex;
10
+ justify-content: space-around;
11
+ }
12
+ .page{
13
+ position: fixed;
14
+ margin: auto;
15
+ bottom: 50%;
16
+ right: 15%;
17
+ }
18
+ .welcome{
19
+ font-size: 70px;
20
+ color:white;
21
+ }
22
+ body{
23
+ background-color: black;
24
+ }
static/images/3a6c895d2eb9558c10fc861443b50aee83be77f9_1630571642_fa17bf5b5a9d454788d5bf9f4360de87.png ADDED
static/images/3b6c02e7ac7285a9196e0bf6735568af26dc41e5_1618042275_f61ff47ae62f406a9e7fc93d3df3ebf3.png ADDED
static/images/3b76371c871b2774dbe1c35016da990dc3374ec1_1622095978_054e566afc0141558f371dc7409ef7d8.png ADDED
static/images/3bd342172c5971c8c804682b8febadad5663ebd4_1613568177_ae560918114949e99fec8aaaa230db4e.png ADDED
static/images/3c96ed04df221bd87b810732184f9be65e09be8e_1629543959_a841c137310246f7b3514c46aa7e0613.png ADDED
static/images/3cc8b4966a83b7582e035e09950836e63479450e_1620716085_49328cad06f74257aa4c22d22689146d.png ADDED
static/images/3cd02339fccadc5b18f358e0651bfcf8420325f3_1627363162_b066b67181dd4fc5b940b49eb84e6673.png ADDED
static/images/3cfa434132c3ad50a3f4cd6b6f7fd94050c03c4e_1630128966_4acf3f6da05742dbbc23627a81144f6d.png ADDED
static/images/3d5a097d815eaa08f3d507140e6b603ee634a41c_1628580918_f88a54bc60594456924e296bc6e8bbf2.png ADDED
static/images/3dea3c172d0407082d348f0ae7dba4eabeb3fe59_1629703734_9f72afe21ac04c408287e15dbe3aa543.png ADDED
static/images/3e3ccc0f17e593440e152473eee9c23942cc2770_1614160012_dfd6e29a5c8841f08ddffd3a62d000a5.png ADDED
static/images/Seller.png ADDED
static/images/chat.png ADDED
static/images/customer.png ADDED
static/images/error.png ADDED
static/images/gun.jpg ADDED
static/images/login.jpg ADDED
static/images/pro1.jpg ADDED
static/images/pro2.jpg ADDED
static/images/pro3.jpg ADDED
static/images/sales.png ADDED
templates/Niche.html ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Document</title>
7
+ <link rel="stylesheet" href="{{url_for('static',filename='css/Niche_style.css')}}">
8
+ </head>
9
+ <body>
10
+ <div class="Entry">
11
+ <h1>Are You A?</h1>
12
+ <div class="choice">
13
+ <div class="Customer">
14
+ <a href="/products"><img id="cust_img" src="{{url_for('static',filename='images/customer.png')}}" alt="image_error" width="100px",height="50px"></a>
15
+ <h3>Customer</h3>
16
+ </div>
17
+ <div class="Seller">
18
+ <a href="/seller"><img id="sel_img" src="{{url_for('static',filename='images/Seller.png')}}" alt="image_error" width="100px",height="50px"></a>
19
+ <h3>Seller</h3>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </body>
24
+ </html>
templates/Signup.html ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Signup</title>
7
+ <link rel="stylesheet" href="{{url_for('static',filename='css/signup_style.css')}}">
8
+ </head>
9
+ <body>
10
+ <form action="/sign_up" method="post">
11
+ <h1>Sign-up</h1>
12
+ <label for="username" class="form">Name:</label>
13
+ <input type="text" id="username" class="form" name="name">
14
+ <label for="E-mail" class="form">E-mail:</label>
15
+ <input type="email" id="E-mail" class="form" name="email">
16
+ <label class="form" name="gender">Gender</label>
17
+ <select class="form">
18
+ <option value="">--Select--</option>
19
+ <option value="Male">Male</option>
20
+ <option value="Female">Female</option>
21
+ </select>
22
+ <label for="enter_password" class="form">Enter Password</label>
23
+ <input type="password" id="enter_password" class="form" name="password">
24
+ <label for="con_password" class="form"> Confirm Password</label>
25
+ <input type="password" id="con_password" class="form" name="confirm">
26
+ <button type="submit" class="form">Sign Up</button>
27
+ </form>
28
+ </body>
29
+ </html>
templates/add_product.html ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Document</title>
7
+ <link rel="stylesheet" href="{{url_for('static',filename='css/add_product.css')}}">
8
+ </head>
9
+ <body>
10
+ <form action="/tell" method="post" enctype="multipart/form-data" class="add">
11
+ <input type="file" name="image" class="field" required>
12
+ <label for="name" class="field">Name</label>
13
+ <input type="text" id="name" class="field" name="name">
14
+ <label for="cateory" class="field">Category</label>
15
+ <input type="text" id="category" class="field" name="category">
16
+ <label for="description" class="field">Description</label>
17
+ <textarea id="description" class="field" name="description"></textarea>
18
+ <label for="price" class="field">Price</label>
19
+ <input type="text" id="price" name="price">
20
+ <label for="code" class="field">Product code</label>
21
+ <input type="text" id="code" class="field">
22
+ <label for="brand" class="field">Brand</label>
23
+ <input type="text" for="brand" class="field" name="brand">
24
+ <button type="submit" class="field">List on store</button>
25
+ </form>
26
+ </body>
27
+ </html>