first commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"lang":"en",
|
||||
"name":"model",
|
||||
"version":"0.0.0",
|
||||
"spacy_version":">=2.3.5",
|
||||
"description":"",
|
||||
"author":"",
|
||||
"email":"",
|
||||
"url":"",
|
||||
"license":"",
|
||||
"spacy_git_version":"1d4b1dea2",
|
||||
"vectors":{
|
||||
"width":0,
|
||||
"vectors":0,
|
||||
"keys":0,
|
||||
"name":"spacy_pretrained_vectors"
|
||||
},
|
||||
"pipeline":[
|
||||
"ner"
|
||||
],
|
||||
"factories":{
|
||||
"ner":"ner"
|
||||
},
|
||||
"labels":{
|
||||
"ner":[
|
||||
"Bank Account No",
|
||||
"Bank Name",
|
||||
"Due Date",
|
||||
"Grand Total",
|
||||
"Invoice Date",
|
||||
"Invoice No",
|
||||
"RTGS/IFSC Code",
|
||||
"Round Off"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"beam_width":1,
|
||||
"beam_density":0.0,
|
||||
"beam_update_prob":1.0,
|
||||
"cnn_maxout_pieces":3,
|
||||
"nr_feature_tokens":6,
|
||||
"nr_class":34,
|
||||
"hidden_depth":1,
|
||||
"token_vector_width":96,
|
||||
"hidden_width":64,
|
||||
"maxout_pieces":2,
|
||||
"pretrained_vectors":null,
|
||||
"bilstm_depth":0,
|
||||
"self_attn_depth":0,
|
||||
"conv_depth":4,
|
||||
"conv_window":1,
|
||||
"embed_size":2000
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
�¥movesÚP{"0":{},"1":{"Invoice No":-1,"Invoice Date":-2,"Grand Total":-3,"Bank Name":-4,"Bank Account No":-5,"RTGS/IFSC Code":-6,"Due Date":-7,"Round Off":-8},"2":{"Invoice No":-1,"Invoice Date":-2,"Grand Total":-3,"Bank Name":-4,"Bank Account No":-5,"RTGS/IFSC Code":-6,"Due Date":-7,"Round Off":-8},"3":{"Invoice No":-1,"Invoice Date":-2,"Grand Total":-3,"Bank Name":-4,"Bank Account No":-5,"RTGS/IFSC Code":-6,"Due Date":-7,"Round Off":-8},"4":{"":1,"Invoice No":-1,"Invoice Date":-2,"Grand Total":-3,"Bank Name":-4,"Bank Account No":-5,"RTGS/IFSC Code":-6,"Due Date":-7,"Round Off":-8},"5":{"":1}}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
�
|
||||
@@ -0,0 +1 @@
|
||||
�«lexeme_norm€
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,48 @@
|
||||
Key,Values
|
||||
SELLER NAME,Seller : SHREE TRADING CORPORATION
|
||||
SELLER ADDRESS,"6 & 7 Shree Sita Gaushala , Paharganj, Ajmer, Rajasthan - 305001"
|
||||
SELLER PH,Phone: 9610566688
|
||||
SELLER EMAIL,Email : stc.jaipur@gmail.com
|
||||
SELLER GST,GST No. : 08AAVPM5307P1ZV
|
||||
SELLER PAN,PAN No. : AAVPM5307P
|
||||
BUYER NAME,Buyer : Gurukripa Automobiles
|
||||
BUYER ADDRESS,"Ajmer Front Of Central Jail, Jaipur Road, Ajmer, 305001"
|
||||
BUYER GST,GST No. :Un Registered
|
||||
INVOICE NO,Invoice No. : AJM21-22/XM00444
|
||||
INVOICE DATE,Date : 06 Aug 2021
|
||||
SHIP TO,"Ship to : , , "
|
||||
BUYER GST,GST No. :Un Registered
|
||||
SHIP TO CONTACT,"Contact: Sunil,8955050479"
|
||||
DESTINATION,Destination Terms
|
||||
SI,1
|
||||
HSN,27101980
|
||||
PRODUCT,MOBIL SUPER HP 10W-30 CTN 4X4L:IN-
|
||||
PACK SIZE,1
|
||||
QUANTITY,16.00 LTR
|
||||
RATE,222.88
|
||||
DISC,160
|
||||
TAX %,9%|9%
|
||||
AMOUNT,3406.1
|
||||
SI,2
|
||||
HSN,27101980
|
||||
PRODUCT,MOBIL SUPER MGDO 15W-40 CTN 4X3.5L:IN-
|
||||
PACK SIZE,6
|
||||
QUANTITY,84.00 LTR
|
||||
RATE,220.58
|
||||
DISC,2100
|
||||
TAX %,9%|9%
|
||||
AMOUNT,16428.8
|
||||
TOTAL PACKS & QUANTITY,Total Quantity 7.00 100.00
|
||||
ASSESSABLE AMOUNT,Assessable Amount 19834.90
|
||||
AMOUNT IN WORDS,Amount in words : Rupees Twenty Three Thousand Four Hundred Five only
|
||||
PAYMENT ON OR BEFORE,Payment on or before Save To pay
|
||||
OUTPUT SGST,Output SGST
|
||||
OUTPUT CGST,1785.14 Output CGST
|
||||
DISC,1785.14
|
||||
ROUND OFF,Round off -0.18
|
||||
RTS POINTS EARNED,RTS Points earned: 1200.00
|
||||
OVERALL RTS POINTS,Overall RTS Points: 1758.00
|
||||
GRAND TOTAL,Grand Total 23405.00
|
||||
OUR BANK DETAILS,Our Bank Details : Kotak Mahindra Bank
|
||||
BANK A/C NO,Bank A/c No. : 1412405384
|
||||
RTGS/IFSC,RTGS / IFSC Code : KKBK0003540
|
||||
|
@@ -0,0 +1,48 @@
|
||||
Key,Values
|
||||
SELLERNAME,Seller : SHREE TRADING CORPORATION
|
||||
SELLERADDRESS,"6 & 7 Shree Sita Gaushala , Paharganj, Ajmer, Rajasthan - 305001"
|
||||
SELLERPH,Phone: 9610566688
|
||||
SELLEREMAIL,Email : stc.jaipur@gmail.com
|
||||
SELLERGST,GST No. : 08AAVPM5307P1ZV
|
||||
SELLERPAN,PAN No. : AAVPM5307P
|
||||
BUYERNAME,Buyer : Gurukripa Automobiles
|
||||
BUYERADDRESS,"Ajmer Front Of Central Jail, Jaipur Road, Ajmer, 305001"
|
||||
BUYERGST,GST No. :Un Registered
|
||||
INVOICENO,Invoice No. : AJM21-22/XM00444
|
||||
INVOICEDATE,Date : 06 Aug 2021
|
||||
SHIPTO,"Ship to : , , "
|
||||
BUYERGST,GST No. :Un Registered
|
||||
SHIPTOCONTACT,"Contact: Sunil,8955050479"
|
||||
DESTINATION,Destination Terms
|
||||
SI,1
|
||||
HSN,27101980
|
||||
PRODUCT,MOBIL SUPER HP 10W-30 CTN 4X4L:IN-
|
||||
PACKSIZE,1.00
|
||||
QUANTITY,16.00 LTR
|
||||
RATE,222.88
|
||||
DISC,160.000
|
||||
TAX%,9%|9%
|
||||
AMOUNT,3406.10
|
||||
SI,2
|
||||
HSN,27101980
|
||||
PRODUCT,MOBIL SUPER MGDO 15W-40 CTN 4X3.5L:IN-
|
||||
PACKSIZE,6.00
|
||||
QUANTITY,84.00 LTR
|
||||
RATE,220.58
|
||||
DISC,2100.000
|
||||
TAX%,9%|9%
|
||||
AMOUNT,16428.80
|
||||
TOTALPACKS&QUANTITY,Total Quantity 7.00 100.00
|
||||
ASSESSABLEAMOUNT,Assessable Amount 19834.90
|
||||
AMOUNTINWORDS,Amount in words : Rupees Twenty Three Thousand Four Hundred Five only
|
||||
PAYMENTONORBEFORE,Payment on or before Save To pay
|
||||
OUTPUTSGST,Output SGST
|
||||
OUTPUTCGST,1785.14 Output CGST
|
||||
DISC,1785.14
|
||||
ROUNDOFF,Round off -0.18
|
||||
RTSPOINTSEARNED,RTS Points earned: 1200.00
|
||||
OVERALLRTSPOINTS,Overall RTS Points: 1758.00
|
||||
GRANDTOTAL,Grand Total 23405.00
|
||||
OURBANKDETAILS,Our Bank Details : Kotak Mahindra Bank
|
||||
BANKACNO,Bank A/c No. : 1412405384
|
||||
RTGSIFSC,RTGS / IFSC Code : KKBK0003540
|
||||
|
@@ -0,0 +1,20 @@
|
||||
Key
|
||||
SELLERNAME
|
||||
SELLERPH
|
||||
SELLEREMAIL
|
||||
SELLERGST
|
||||
SELLERPAN
|
||||
BUYERNAME
|
||||
BUYERGST
|
||||
BUYERPAN
|
||||
INVOICENO
|
||||
INVOICEDATE
|
||||
PONO
|
||||
SHIPTO
|
||||
SHIPTOGST
|
||||
SHIPTOCONTACT
|
||||
DISC
|
||||
OURBANKDETAILS
|
||||
BANKACNO
|
||||
RTGSIFSC
|
||||
AMOUNTINWORDS
|
||||
|
@@ -0,0 +1,30 @@
|
||||
Key
|
||||
SELLERADDRESS
|
||||
BUYERADDRESS
|
||||
DESTINATION
|
||||
SI
|
||||
HSN
|
||||
PRODUCT
|
||||
PACKSIZE
|
||||
QUANTITY
|
||||
RATE
|
||||
DISC
|
||||
TAX%
|
||||
AMOUNT
|
||||
SI
|
||||
HSN
|
||||
PRODUCT
|
||||
PACKSIZE
|
||||
QUANTITY
|
||||
RATE
|
||||
DISC
|
||||
TAX%
|
||||
AMOUNT
|
||||
TOTALPACKS&QUANTITY
|
||||
PAYMENTONORBEFORE
|
||||
PAYMENTTYPE
|
||||
OUTPUTSGST
|
||||
OUTPUTCGST
|
||||
ROUNDOFF
|
||||
GRANDTOTAL
|
||||
ASSESSABLEAMOUNT
|
||||
|
@@ -0,0 +1 @@
|
||||
{"0":{"SELLERNAME":"SHREE TRADING CORPORATION","SELLERADDRESS":"6 & 7 Shree Sita Gaushala , Paharganj, Ajmer, Rajasthan - 305001","SELLERPH":9610566688,"SELLEREMAIL":"stc.jaipur@gmail.com","SELLERGST":"08AAVPM5307P1ZV","SELLERPAN":"AAVPM5307P","BUYERNAME":"Gurukripa Automobiles","BUYERADDRESS":"Ajmer Front Of Central Jail, Jaipur Road, Ajmer, 305001","BUYERGST":"Un Registered","INVOICENO":"AJM21-22\/XM00444","INVOICEDATE":"06 Aug 2021","SHIPTO":", ,","SHIPTOCONTACT":"Sunil,8955050479","DESTINATION":"Destination Terms","TOTALPACKS&QUANTITY":null,"ASSESSABLEAMOUNT":null,"AMOUNTINWORDS":"Rupees Twenty Three Thousand Four Hundred Five only","PAYMENTONORBEFORE":null,"OUTPUTSGST":null,"OUTPUTCGST":null,"ROUNDOFF":null,"RTSPOINTSEARNED":null,"OVERALLRTSPOINTS":null,"GRANDTOTAL":null,"OURBANKDETAILS":"Kotak Mahindra Bank","BANKACNO":1412405384,"RTGSIFSC":"KKBK0003540"}}
|
||||
@@ -0,0 +1,427 @@
|
||||
afrom flask import Flask, render_template, send_file, request, redirect, Response
|
||||
import spacy
|
||||
import os
|
||||
import shutil
|
||||
import pytesseract
|
||||
|
||||
import requests
|
||||
|
||||
import time
|
||||
import multiprocessing
|
||||
from PIL import Image
|
||||
from functools import partial
|
||||
|
||||
app = Flask(__name__)
|
||||
nlp_model1 = spacy.load("p")
|
||||
app.config["IMAGE_UPLOADS"] = "/home/ubuntu/AI/InvoiceParser/upload_invoice"
|
||||
|
||||
|
||||
@app.route("/", methods=["GET"])
|
||||
def home():
|
||||
return render_template("invoice.html")
|
||||
|
||||
|
||||
# @app.route("/upload_invoice", methods=["GET", "POST"])
|
||||
def predict(url_list):
|
||||
# if request.method == "POST":
|
||||
|
||||
# if request.files:
|
||||
|
||||
# image = request.files["image"]
|
||||
# try:
|
||||
# image.save(os.path.join(app.config["IMAGE_UPLOADS"], image.filename))
|
||||
# except IsADirectoryError:
|
||||
# return render_template("invoice.html")
|
||||
# # image.save(os.path.join(
|
||||
# # app1.config["IMAGE_UPLOADS"], image.filename))
|
||||
|
||||
# print("Image saved in Invoice")
|
||||
|
||||
# return redirect(request.url)
|
||||
Dataset = request.get_json()
|
||||
# print(Dataset)
|
||||
a = url_list
|
||||
x = a['FileData']
|
||||
# print(x)
|
||||
y = a['FileName']
|
||||
z = a['FileType']
|
||||
name = y + '.' + z
|
||||
print(name)
|
||||
# print(y)
|
||||
# image = y.split("/")
|
||||
# filename=image[-1]
|
||||
|
||||
# print(x)
|
||||
img_data = x.encode()
|
||||
|
||||
import base64
|
||||
with open('/home/ubuntu/AI/InvoiceParser/upload_invoice/' + name, "wb") as fh:
|
||||
fh.write(base64.decodebytes(img_data))
|
||||
|
||||
# Renaming file name
|
||||
# os.chdir("/home/ubuntu/AI/InvoiceParser/upload_invoice/")
|
||||
# print(os.getcwd())
|
||||
#
|
||||
# for count, f in enumerate(os.listdir()):
|
||||
# f_name, f_ext = os.path.splitext(f)
|
||||
# f_name = "" + str(count)
|
||||
#
|
||||
# new_name = f"{f_name}{f_ext}"
|
||||
# os.rename(f, new_name)
|
||||
import glob
|
||||
ts = 0
|
||||
for file_name in glob.glob("/home/ubuntu/AI/InvoiceParser/upload_invoice/*"):
|
||||
fts = os.path.getmtime(file_name)
|
||||
if fts > ts:
|
||||
ts = fts
|
||||
found = file_name
|
||||
print(found)
|
||||
|
||||
s = "/home/ubuntu/AI/InvoiceParser/upload_invoice"
|
||||
s = os.listdir(s)
|
||||
for file in s:
|
||||
if file.endswith(".jpg"):
|
||||
fname = (found)
|
||||
elif file.endswith(".png"):
|
||||
fname = (found)
|
||||
elif file.endswith(".pdf"):
|
||||
fname = (found)
|
||||
elif file.endswith(".jpeg"):
|
||||
fname = (found)
|
||||
elif file.endswith(".JPEG"):
|
||||
fname = (found)
|
||||
|
||||
def img_to_pdf(): # png to editable pdf conversion
|
||||
pdf = pytesseract.image_to_pdf_or_hocr(fname, extension="pdf")
|
||||
with open(
|
||||
"/home/ubuntu/AI/InvoiceParser/upload_invoice/demo.pdf",
|
||||
"w+b",
|
||||
) as f:
|
||||
f.write(pdf)
|
||||
|
||||
if fname.endswith(".pdf"):
|
||||
print()
|
||||
else:
|
||||
img_to_pdf()
|
||||
fname = "/home/ubuntu/AI/InvoiceParser/upload_invoice/demo.pdf"
|
||||
|
||||
sourcepath = "/home/ubuntu/AI/InvoiceParser/upload_invoice"
|
||||
sourcefiles = os.listdir(sourcepath)
|
||||
destinationpath = "/home/ubuntu/AI/InvoiceParser/uploads"
|
||||
for file in sourcefiles:
|
||||
if file.endswith(".pdf"):
|
||||
shutil.copy2(
|
||||
os.path.join(sourcepath, file), os.path.join(destinationpath, file)
|
||||
)
|
||||
os.chdir("/home/ubuntu/AI/InvoiceParser/uploads")
|
||||
print(os.getcwd())
|
||||
print("file name conerted to o.pdf")
|
||||
for count, f in enumerate(os.listdir()):
|
||||
f_name, f_ext = os.path.splitext(f)
|
||||
f_name = "" + str(count)
|
||||
new_name = f"{f_name}{f_ext}"
|
||||
os.rename(f, new_name)
|
||||
|
||||
import spacy
|
||||
import sys
|
||||
import fitz
|
||||
|
||||
fname = "/home/ubuntu/AI/InvoiceParser/uploads/0.pdf"
|
||||
doc = fitz.open(fname)
|
||||
text = ""
|
||||
for page in doc:
|
||||
text = text + str(page.get_text())
|
||||
|
||||
fitz = " ".join(text.split("\n"))
|
||||
# print(fitz)
|
||||
|
||||
import pandas as pd
|
||||
|
||||
doc = nlp_model1(fitz)
|
||||
k = []
|
||||
l = []
|
||||
for ent in doc.ents:
|
||||
# print(f"{ent.label_.upper():{30}}- {ent.text}")
|
||||
k.append(ent.label_.upper())
|
||||
l.append(ent.text)
|
||||
|
||||
columns = k
|
||||
rows = [l]
|
||||
data = pd.DataFrame(rows, columns=columns)
|
||||
df = data
|
||||
|
||||
df = data.T
|
||||
|
||||
df.to_csv("/home/ubuntu/AI/InvoiceParser/Invoice.csv")
|
||||
|
||||
import pandas as pd
|
||||
df = pd.read_csv("/home/ubuntu/AI/InvoiceParser/Invoice.csv")
|
||||
# df.head()
|
||||
# df = df.T
|
||||
# new_header = df.iloc[0] # grab the first row for the header
|
||||
# df = df[1:] # take the data less the header row
|
||||
# df.columns = new_header
|
||||
|
||||
# def df_column_uniquify(df):
|
||||
# df_columns = df.columns
|
||||
# new_columns = []
|
||||
# for item in df_columns:
|
||||
# counter = 0
|
||||
# newitem = item
|
||||
# while newitem in new_columns:
|
||||
# counter += 1
|
||||
# newitem = "{}_{}".format(item, counter)
|
||||
# new_columns.append(newitem)
|
||||
# df.columns = new_columns
|
||||
# return df.T
|
||||
|
||||
# df = df_column_uniquify(df)
|
||||
# # df=df.T
|
||||
# df.to_csv('/home/ubuntu/AI/InvoiceParser/final.csv')
|
||||
#df = pd.read_csv('/home/ubuntu/AI/InvoiceParser/final.csv')
|
||||
df.rename({df.columns[-2]: 'Key'}, axis=1, inplace=True)
|
||||
df.rename({df.columns[-1]: 'Values'}, axis=1, inplace=True)
|
||||
df['Key'] = df['Key'].str.replace('/', '')
|
||||
df['Key'] = df['Key'].str.replace(' ', '')
|
||||
df.to_csv('/home/ubuntu/AI/InvoiceParser/final.csv', index=False)
|
||||
import pandas as pd
|
||||
x1 = pd.read_csv('/home/ubuntu/AI/InvoiceParser/final.csv')
|
||||
tp = pd.read_csv('/home/ubuntu/AI/InvoiceParser/finalwithcolen.csv')
|
||||
merge = pd.merge(x1, tp, on='Key', how='right')
|
||||
merge1 = merge
|
||||
merge = merge['Values'].str.split(":", expand=True)
|
||||
merge.rename({merge.columns[-1]: 'Values'}, axis=1, inplace=True)
|
||||
frames = [merge1['Key'], merge['Values']]
|
||||
result = pd.concat(frames, axis=1)
|
||||
|
||||
x1 = pd.read_csv('/home/ubuntu/AI/InvoiceParser/final.csv')
|
||||
tp = pd.read_csv('/home/ubuntu/AI/InvoiceParser/finalwithoutcolen.csv')
|
||||
merged = pd.merge(x1, tp, on='Key', how='right')
|
||||
frames = [result, merged]
|
||||
result1 = pd.concat(frames)
|
||||
result1.to_csv('/home/ubuntu/AI/InvoiceParser/final1.csv', index=False)
|
||||
|
||||
x1 = pd.read_csv('/home/ubuntu/AI/InvoiceParser/main.csv')
|
||||
tp = pd.read_csv('/home/ubuntu/AI/InvoiceParser/final1.csv')
|
||||
tp['Key'] = tp['Key'].str.strip()
|
||||
tp['Values'] = tp['Values'].str.strip()
|
||||
|
||||
merge = pd.merge(tp, x1, on='Key', how='right')
|
||||
merge.to_csv('/home/ubuntu/AI/InvoiceParser/invoicewithouttable.csv', index=False)
|
||||
df2 = pd.read_csv('/home/ubuntu/AI/InvoiceParser/invoicewithouttable.csv')
|
||||
|
||||
# Import writer class from csv module
|
||||
from csv import writer
|
||||
|
||||
|
||||
List=['PlantCode'," "]
|
||||
with open('/home/ubuntu/AI/InvoiceParser/invoicewithouttable.csv', 'a') as f_object:
|
||||
writer_object = writer(f_object)
|
||||
writer_object.writerow(List)
|
||||
f_object.close()
|
||||
# print(df2)
|
||||
df2 = pd.read_csv('/home/ubuntu/AI/InvoiceParser/invoicewithouttable.csv')
|
||||
df2 = df2.T
|
||||
|
||||
df2.to_csv('/home/ubuntu/AI/InvoiceParser/invoicewithouttable.csv', index=False, header=False)
|
||||
|
||||
df1 = pd.read_csv('/home/ubuntu/AI/InvoiceParser/invoicewithouttable.csv')
|
||||
df1.to_json('/home/ubuntu/AI/InvoiceParser/firstjson.json', orient="index")
|
||||
import pandas as pd
|
||||
x = pd.read_csv('/home/ubuntu/AI/InvoiceParser/final.csv')
|
||||
tp = pd.read_csv('/home/ubuntu/AI/InvoiceParser/item1.csv')
|
||||
x['Values'] = x['Values'].str.strip()
|
||||
merge = pd.merge(tp, x, on='Key', how='inner')
|
||||
merge = merge.groupby('Key').agg({
|
||||
'Values': '/'.join,
|
||||
}).reset_index()
|
||||
z = merge['Values'].str.split('/', expand=True)
|
||||
frames = [merge, z]
|
||||
result1 = pd.concat(frames, axis=1)
|
||||
result1 = result1.drop(['Values'], axis=1)
|
||||
import pandas as pd
|
||||
tp = pd.read_csv('/home/ubuntu/AI/InvoiceParser/item1.csv')
|
||||
merge = pd.merge(tp, result1, on='Key', how='inner')
|
||||
merge = merge.T
|
||||
new_header = merge.iloc[0] # grab the first row for the header
|
||||
merge = merge[1:] # take the data less the header row
|
||||
merge.columns = new_header
|
||||
|
||||
merge = merge.to_dict('records')
|
||||
invoice_Item=merge
|
||||
|
||||
|
||||
# import pandas as pd
|
||||
# import json
|
||||
# dflist = []
|
||||
# x = pd.read_csv('/home/ubuntu/AI/InvoiceParser/item1.csv')
|
||||
# tp = pd.read_csv('/home/ubuntu/AI/InvoiceParser/final.csv')
|
||||
# tp['Key']=tp['Key'].str.strip()
|
||||
# tp['Values']=tp['Values'].str.strip()
|
||||
# # tp = tp.loc[:, ~tp.columns.str.contains('^Unnamed')]
|
||||
# merge = pd.merge(x, tp, on='Key', how='left')
|
||||
# merge.to_csv('/home/ubuntu/AI/InvoiceParser/invoicewithtable1.csv', index=False)
|
||||
|
||||
# dfPG = pd.read_csv('/home/ubuntu/AI/InvoiceParser/invoicewithtable1.csv')
|
||||
# import numpy as np
|
||||
# dfPG = dfPG.replace({np.nan: None})
|
||||
# x2 = dfPG.iloc[:, -2].tolist()
|
||||
# y2 = dfPG.iloc[:, -1].tolist()
|
||||
# z1 = dict(zip(x2, y2))
|
||||
# dflist.append(z1)
|
||||
# # u1 = json.dumps(z1)
|
||||
# import pandas as pd
|
||||
|
||||
# x = pd.read_csv('/home/ubuntu/AI/InvoiceParser/item2.csv')
|
||||
# tp = pd.read_csv('/home/ubuntu/AI/InvoiceParser/final.csv')
|
||||
# tp['Key']=tp['Key'].str.strip()
|
||||
# tp['Values']=tp['Values'].str.strip()
|
||||
# # tp = tp.loc[:, ~tp.columns.str.contains('^Unnamed')]
|
||||
# merge = pd.merge(x, tp, on='Key', how='left')
|
||||
# merge.to_csv('/home/ubuntu/AI/InvoiceParser/invoicewithtable2.csv', index=False)
|
||||
|
||||
# dfUG = pd.read_csv('/home/ubuntu/AI/InvoiceParser/invoicewithtable2.csv')
|
||||
# import numpy as np
|
||||
# dfUG = dfUG.replace({np.nan: None})
|
||||
# x2 = dfUG.iloc[:, -2].tolist()
|
||||
# y2 = dfUG.iloc[:, -1].tolist()
|
||||
# z2 = dict(zip(x2, y2))
|
||||
# dflist.append(z2)
|
||||
# u2 = json.dumps(z2)
|
||||
# final = '[' + str(z1) + ',' + str(z2) + ']'
|
||||
# return render_template('resume.html')
|
||||
############################################Document############################################################
|
||||
|
||||
import base64
|
||||
empty = []
|
||||
name = found
|
||||
image = open(name, 'rb')
|
||||
image_read = image.read()
|
||||
image_64_encode = base64.b64encode(image_read)
|
||||
NULL = 'null'
|
||||
# empty.append("ByteData--" + (NULL).strip('""'))
|
||||
image_64_encode = image_64_encode.decode('utf-8')
|
||||
empty.append("FileData--" + str(image_64_encode))
|
||||
imagedata = name.split("/")
|
||||
imagename = str(imagedata[-1]).replace('"', '').replace("[", "").replace("]", "")
|
||||
imagename1 = str(imagename).split('.')
|
||||
|
||||
imagename = str(imagename1[-2]).replace("[", "]")
|
||||
empty.append("FileName--" + imagename)
|
||||
empty.append("FilePath--" + name)
|
||||
imageExtension = str(imagename1[-1]).replace("[", "]")
|
||||
empty.append("FileType--" + imageExtension)
|
||||
|
||||
import pandas as pd
|
||||
df = pd.DataFrame(empty)
|
||||
df = df[0].str.split("--", expand=True)
|
||||
data1 = pd.DataFrame(df[0])
|
||||
data2 = pd.DataFrame(df[1])
|
||||
dt = data2.set_index(data1[0])
|
||||
|
||||
dt4 = dt.T
|
||||
list = []
|
||||
dictionary = dt4.to_dict(orient="index")
|
||||
|
||||
a = {
|
||||
"FileId": 0,
|
||||
"FileData": "",
|
||||
"FileName": "",
|
||||
"FileType": "",
|
||||
"RefId": 0
|
||||
}
|
||||
list = []
|
||||
|
||||
list.append(a)
|
||||
list.append(dictionary[1])
|
||||
|
||||
import json
|
||||
|
||||
with open('/home/ubuntu/AI/InvoiceParser/firstjson.json', 'r') as json_file:
|
||||
json_load = json.load(json_file)
|
||||
|
||||
# url = "https://test.bizgaze.app:8443/apis/v4/bizgaze/integrations/businesscards/create"
|
||||
|
||||
nothing = json.dumps(json_load).replace("]", "").replace("[", "").replace('{"0":', '').replace('}}', '}')
|
||||
import json
|
||||
|
||||
# JSON data:
|
||||
x = nothing
|
||||
|
||||
# python object to be appended
|
||||
y = {"InvoiceItems":invoice_Item}
|
||||
y1 = {"Document": list}
|
||||
|
||||
# parsing JSON string:
|
||||
z = json.loads(x)
|
||||
|
||||
# appending the data
|
||||
z.update(y)
|
||||
z.update(y1)
|
||||
|
||||
# the result is a JSON string:
|
||||
# print(json.dumps(z))
|
||||
# print('##########################')
|
||||
# print(z)
|
||||
# print('##########################')
|
||||
import requests
|
||||
import json
|
||||
|
||||
# with open('visitingcard1.json', 'r') as json_file:
|
||||
# json_load = json.load(json_file)
|
||||
url = "https://test.bizgaze.app:8443/apis/v4/bizgaze/integrations/invoice/createsalesinvoice"
|
||||
#url="https://test.bizgaze.app:8443/apis/v4/bizgaze/integrations/invoice/createsalesinvoice"
|
||||
payload1 = json.dumps(z)
|
||||
print('--------------------------------------------------------------------------')
|
||||
print(payload1)
|
||||
headers = {
|
||||
'Authorization': 'stat 089166c35d4c4d7d941c99d6f8986834',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
response = requests.request("POST", url, headers=headers, data=payload1)
|
||||
print("##############################################################")
|
||||
print(response.text)
|
||||
|
||||
import glob
|
||||
files = glob.glob(
|
||||
"/home/ubuntu/AI/InvoiceParser/upload_invoice/*"
|
||||
)
|
||||
for f in files:
|
||||
os.remove(f)
|
||||
files = glob.glob(
|
||||
"/home/ubuntu/AI/InvoiceParser/uploads/*"
|
||||
)
|
||||
for f in files:
|
||||
os.remove(f)
|
||||
|
||||
return payload1
|
||||
|
||||
|
||||
@app.route("/Download_invoice")
|
||||
def Download_invoice():
|
||||
pass
|
||||
|
||||
|
||||
@app.route("/Table")
|
||||
def Table():
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@app.route('/upload_invoice', methods=["POST"])
|
||||
def upload_invoice():
|
||||
if __name__ == "__main__":
|
||||
url_list = []
|
||||
Dataset = request.get_json()
|
||||
# id = "100013660000125"
|
||||
url_list.append(Dataset)
|
||||
# multiprocessing
|
||||
with multiprocessing.Pool(processes=30) as pool:
|
||||
results = pool.map(predict, url_list)
|
||||
|
||||
pool.close()
|
||||
return results[0]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host='0.0.0.0', port=9797, debug=True)
|
||||
@@ -0,0 +1,2 @@
|
||||
SELLER NAME,SELLER ADDRESS,SELLER PH,SELLER EMAIL,SELLER GST,SELLER PAN,BUYER NAME,BUYER ADDRESS,BUYER GST,INVOICE NO,INVOICE DATE,SHIP TO,SHIP TO CONTACT,DESTINATION,TOTAL PACKS & QUANTITY,ASSESSABLE AMOUNT,AMOUNT IN WORDS,PAYMENT ON OR BEFORE,OUTPUT SGST,OUTPUT CGST,ROUND OFF,RTS POINTS EARNED,OVERALL RTS POINTS,GRAND TOTAL,OUR BANK DETAILS,BANK A/C NO,RTGS/IFSC
|
||||
Seller : SHREE TRADING CORPORATION,"H- 575A,ROAD NO.6, V.K.I AREA, Jaipur, Rajasthan - 302023",Phone: 9610566688,Email : stc.jaipur@gmail.com,GST No. : 08AAVPM5307P1ZV,PAN No. : AAVPM5307P,Buyer : Stonex India Pvt. Ltd.,"Khasra No. 210, Village - Rahimpura,Makrana Road Kishangarh, 305801",GST No. :08AACCG9620R1ZZ,Invoice No. : JPR21-22/XM01902,Date : 28 Jul 2021,Ship to : ,"Contact: Rajat Ji,9116616323",Destination Kishangarh,Total Quantity 2.00 416.00,Assessable Amount 87360.00,Amount in words : Rupees One Lakh Three Thousand Eighty Five only,Payment on or before Save To pay,Output SGST ,7862.40 Output CGST ,Round off 0.20,,,Grand Total 103085.00,Our Bank Details : Kotak Mahindra Bank,Bank A/c No. : 1412405384,RTGS / IFSC Code : KKBK0003540
|
||||
|
@@ -0,0 +1,10 @@
|
||||
Key,Values
|
||||
SI,1
|
||||
HSN,27101980
|
||||
PRODUCT,"MOBILGEAR 600 XP 680, 208LT, DR-"
|
||||
PACK SIZE,1.00
|
||||
QUANTITY,208.00 LTR
|
||||
RATE,240.00
|
||||
DISC,0.000
|
||||
TAX %,9%|9%
|
||||
AMOUNT,49920.00
|
||||
|
@@ -0,0 +1,10 @@
|
||||
Key,Implement,Values
|
||||
SI_1,SI,2
|
||||
HSN_1,HSN,27101980
|
||||
PRODUCT_1,PRODUCT,SPARTAN EP 150 DRUM 208L:IN-
|
||||
PACK SIZE_1,PACK SIZE,1.00
|
||||
QUANTITY_1,QUANTITY,208.00 LTR
|
||||
RATE_1,RATE,180.00
|
||||
DISC_1,DISC,0.000
|
||||
TAX %_1,TAX %,9%|9%
|
||||
AMOUNT_1,AMOUNT,37440.00
|
||||
|
@@ -0,0 +1,10 @@
|
||||
Key
|
||||
SI
|
||||
HSN
|
||||
PRODUCT
|
||||
PACKSIZE
|
||||
QUANTITY
|
||||
RATE
|
||||
DISC
|
||||
TAX %
|
||||
AMOUNT
|
||||
|
@@ -0,0 +1,10 @@
|
||||
Key,Implement
|
||||
SI_1,SI
|
||||
HSN_1,HSN
|
||||
PRODUCT_1,PRODUCT
|
||||
PACK SIZE_1,PACK SIZE
|
||||
QUANTITY_1,QUANTITY
|
||||
RATE_1,RATE
|
||||
DISC_1,DISC
|
||||
TAX %_1,TAX %
|
||||
AMOUNT_1,AMOUNT
|
||||
|
@@ -0,0 +1,28 @@
|
||||
Key
|
||||
SELLER NAME
|
||||
SELLER ADDRESS
|
||||
SELLER PH
|
||||
SELLER EMAIL
|
||||
SELLER GST
|
||||
SELLER PAN
|
||||
BUYER NAME
|
||||
BUYER ADDRESS
|
||||
BUYER GST
|
||||
INVOICE NO
|
||||
INVOICE DATE
|
||||
SHIP TO
|
||||
SHIP TO CONTACT
|
||||
DESTINATION
|
||||
TOTAL PACKS & QUANTITY
|
||||
ASSESSABLE AMOUNT
|
||||
AMOUNT IN WORDS
|
||||
PAYMENT ON OR BEFORE
|
||||
OUTPUT SGST
|
||||
OUTPUT CGST
|
||||
ROUND OFF
|
||||
RTS POINTS EARNED
|
||||
OVERALL RTS POINTS
|
||||
GRAND TOTAL
|
||||
OUR BANK DETAILS
|
||||
BANK A/C NO
|
||||
RTGS/IFSC
|
||||
|
@@ -0,0 +1 @@
|
||||
{"lang":"en","name":"model","version":"0.0.0","spacy_version":">=2.2.4","description":"","author":"","email":"","url":"","license":"","vectors":{"width":0,"vectors":0,"keys":0,"name":"spacy_pretrained_vectors"},"pipeline":["ner"],"factories":{"ner":"ner"},"labels":{"ner":["AMOUNT","AMOUNT IN WORDS","ASSESSABLE AMOUNT","BANK A/C NO","BUYER ADDRESS","BUYER GST","BUYER NAME","BUYER PAN","DESTINATION","DISC","DISPATCHED THROUGH","GRAND TOTAL","HSN","INVOICE DATE","INVOICE NO","NARRATION","OUR BANK DETAILS","OUTPUT CGST","OUTPUT SGST","OVERALL RTS POINTS","Output IGST","PACK SIZE","PAYMENT ON OR BEFORE","PAYMENT TYPE","PAYMENT TYPE ","PO NO","PRODUCT","QUANTITY","RATE","ROUND OFF","RTGS/IFSC","RTGS/IFSC ","RTS POINTS EARNED","SELLER ADDRESS","SELLER EMAIL","SELLER GST","SELLER NAME","SELLER PAN","SELLER PH","SHIP TO","SHIP TO ADDRESS","SHIP TO CONTACT","SHIP TO GST","SI","TAX %","TOTAL PACKS & QUANTITY","TOTAL PACKS AND QUANTITY"]}}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"beam_width":1,
|
||||
"beam_density":0.0,
|
||||
"beam_update_prob":1.0,
|
||||
"cnn_maxout_pieces":3,
|
||||
"nr_feature_tokens":6,
|
||||
"nr_class":190,
|
||||
"hidden_depth":1,
|
||||
"token_vector_width":96,
|
||||
"hidden_width":64,
|
||||
"maxout_pieces":2,
|
||||
"pretrained_vectors":null,
|
||||
"bilstm_depth":0,
|
||||
"self_attn_depth":0,
|
||||
"conv_depth":4,
|
||||
"conv_window":1,
|
||||
"embed_size":2000
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
�¥movesÚ
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
�
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,87 @@
|
||||
asgiref==3.5.0
|
||||
backports.zoneinfo==0.2.1
|
||||
blis==0.7.5
|
||||
camelot-py==0.10.1
|
||||
catalogue==1.0.0
|
||||
certifi==2021.10.8
|
||||
cffi==1.15.0
|
||||
chardet==4.0.0
|
||||
charset-normalizer==2.0.9
|
||||
ci-info==0.2.0
|
||||
click==8.0.3
|
||||
coloredlogs==15.0.1
|
||||
configobj==5.0.6
|
||||
configparser==5.2.0
|
||||
cryptography==36.0.1
|
||||
cycler==0.11.0
|
||||
cymem==2.0.6
|
||||
Django==4.0.3
|
||||
docx==0.2.4
|
||||
docx2txt==0.8
|
||||
et-xmlfile==1.1.0
|
||||
etelemetry==0.2.2
|
||||
filelock==3.4.2
|
||||
fitz==0.0.1.dev2
|
||||
Flask==2.0.2
|
||||
fonttools==4.28.5
|
||||
future==0.18.2
|
||||
ghostscript==0.7
|
||||
httplib2==0.20.2
|
||||
humanfriendly==10.0
|
||||
idna==3.3
|
||||
image==1.5.33
|
||||
img2pdf==0.4.3
|
||||
importlib-resources==5.4.0
|
||||
isodate==0.6.1
|
||||
itsdangerous==2.0.1
|
||||
Jinja2==3.0.3
|
||||
kiwisolver==1.3.2
|
||||
lxml==4.7.1
|
||||
MarkupSafe==2.0.1
|
||||
matplotlib==3.5.1
|
||||
murmurhash==1.0.6
|
||||
networkx==2.6.3
|
||||
nibabel==3.2.1
|
||||
nipype==1.7.0
|
||||
numpy==1.22.0
|
||||
ocrmypdf==13.4.1
|
||||
opencv-python==4.5.5.62
|
||||
openpyxl==3.0.9
|
||||
packaging==21.3
|
||||
pandas==1.3.5
|
||||
pathlib==1.0.1
|
||||
pdfminer.six==20211012
|
||||
pikepdf==5.1.0
|
||||
Pillow==9.0.0
|
||||
plac==1.1.3
|
||||
pluggy==1.0.0
|
||||
preshed==3.0.6
|
||||
prov==2.0.0
|
||||
pycparser==2.21
|
||||
pydot==1.4.2
|
||||
PyMuPDF==1.19.4
|
||||
pyparsing==3.0.6
|
||||
PyPDF2==1.26.0
|
||||
pytesseract==0.3.8
|
||||
python-dateutil==2.8.2
|
||||
python-docx==0.8.11
|
||||
pytz==2021.3
|
||||
pyxnat==1.4
|
||||
rdflib==6.1.1
|
||||
reportlab==3.6.8
|
||||
requests==2.26.0
|
||||
scipy==1.7.3
|
||||
simplejson==3.17.6
|
||||
six==1.16.0
|
||||
spacy==2.3.5
|
||||
sqlparse==0.4.2
|
||||
srsly==1.0.5
|
||||
tabulate==0.8.9
|
||||
thinc==7.4.5
|
||||
tqdm==4.62.3
|
||||
traits==6.3.2
|
||||
urllib3==1.26.7
|
||||
wasabi==0.9.0
|
||||
Werkzeug==2.0.2
|
||||
xlrd==1.2.0
|
||||
zipp==3.7.0
|
||||
@@ -0,0 +1,92 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<style>
|
||||
|
||||
.button {
|
||||
background-color: #000000; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 15px 32px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.button1 {font-size: 10px;}
|
||||
.button2 {font-size: 12px;}
|
||||
.button3 {font-size: 16px;}
|
||||
.button4 {font-size: 50px;}
|
||||
.button5 {font-size: 24px;border-radius: 12px;}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height:100%;
|
||||
font-family: 'Helvetica';
|
||||
background-color:#000000;
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
text-align:center;
|
||||
letter-spacing:1.4px;
|
||||
}
|
||||
.dropbtn {
|
||||
background-color: #04AA6D;
|
||||
color: white;
|
||||
padding: 16px;
|
||||
font-size: 16px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #f1f1f1;
|
||||
min-width: 160px;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.dropdown-content a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-content a:hover {background-color: #ddd;}
|
||||
|
||||
.dropdown:hover .dropdown-content {display: block;}
|
||||
|
||||
.dropdown:hover .dropbtn {background-color: #3e8e41;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="background-image: url('https://lh3.googleusercontent.com/p/AF1QipONWF8G50u9Bu-dklcj3kzesofOn8Z0q0LdHeU1=w1080-h608-p-no-v0');
|
||||
/* Full height */
|
||||
height: 100%;
|
||||
/ Center and scale the image nicely /
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br> <br>
|
||||
<a class="button button5"href="/">RETURN HOME</a><br><br><br>
|
||||
|
||||
<h3 class="button button3">Invalid File Input </h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,97 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<style>
|
||||
|
||||
.button {
|
||||
background-color: #000000; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 15px 32px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.button1 {font-size: 10px;}
|
||||
.button2 {font-size: 12px;}
|
||||
.button3 {font-size: 16px;}
|
||||
.button4 {font-size: 50px;}
|
||||
.button5 {font-size: 24px;border-radius: 12px;}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height:100%;
|
||||
font-family: 'Helvetica';
|
||||
background-color:#000000;
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
text-align:center;
|
||||
letter-spacing:1.4px;
|
||||
}
|
||||
.dropbtn {
|
||||
background-color: #04AA6D;
|
||||
color: white;
|
||||
padding: 16px;
|
||||
font-size: 16px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #f1f1f1;
|
||||
min-width: 160px;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.dropdown-content a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-content a:hover {background-color: #ddd;}
|
||||
|
||||
.dropdown:hover .dropdown-content {display: block;}
|
||||
|
||||
.dropdown:hover .dropbtn {background-color: #3e8e41;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="background-image: url('https://lh3.googleusercontent.com/p/AF1QipONWF8G50u9Bu-dklcj3kzesofOn8Z0q0LdHeU1=w1080-h608-p-no-v0');
|
||||
/* Full height */
|
||||
height: 100%;
|
||||
/ Center and scale the image nicely /
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2 class="button button5">Bizgaze Limited</h2><br>
|
||||
<br>
|
||||
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="button button5" >Parser</button>
|
||||
<div class="dropdown-content">
|
||||
<a href="/resume"> RESUME </a>
|
||||
<a href="/invoice"> INVOICE </a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,85 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<style>
|
||||
.button {
|
||||
background-color: #000000; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 15px 32px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.button1 {font-size: 10px;}
|
||||
.button2 {font-size: 12px;}
|
||||
.button3 {font-size: 16px;}
|
||||
.button4 {font-size: 50px;}
|
||||
.button5 {font-size: 24px;border-radius: 12px;}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="background-image: url('https://lh3.googleusercontent.com/p/AF1QipONWF8G50u9Bu-dklcj3kzesofOn8Z0q0LdHeU1=w1080-h608-p-no-v0');
|
||||
/* Full height */
|
||||
height: 100%;
|
||||
/ Center and scale the image nicely /
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;">
|
||||
|
||||
<h1 class="button button5"> INVOICE PARSER </h1>
|
||||
|
||||
<br> <br>
|
||||
<a class="button button5"href="/">HOME</a>
|
||||
|
||||
|
||||
|
||||
<form action="/upload_invoice" method="POST" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
<div class="custom-file">
|
||||
<input type="file" class="button button5" name="image" id="image" accept=".jpg,.png,.jpeg,.JPEG,.pdf"> <br> <br><br>
|
||||
<div class="bg"></div>
|
||||
<input class="button button5" type="submit">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form action="{{ url_for('Download_invoice') }}" method="GET">
|
||||
<br><br> <input type="submit" class="button button5" value="Download"></form>
|
||||
<form action="{{ url_for('Table') }}" method="GET">
|
||||
<br><br> <input type="submit" class="button button5" value="Table"></form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height:100%;
|
||||
font-family: 'Helvetica';
|
||||
background-color:#000000;
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
text-align:center;
|
||||
letter-spacing:1.4px;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,82 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<style>
|
||||
.button {
|
||||
background-color: #000000; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 15px 32px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.button1 {font-size: 10px;}
|
||||
.button2 {font-size: 12px;}
|
||||
.button3 {font-size: 16px;}
|
||||
.button4 {font-size: 50px;}
|
||||
.button5 {font-size: 24px;border-radius: 12px;}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="background-image: url('https://lh3.googleusercontent.com/p/AF1QipONWF8G50u9Bu-dklcj3kzesofOn8Z0q0LdHeU1=w1080-h608-p-no-v0');
|
||||
/* Full height */
|
||||
height: 100%;
|
||||
/ Center and scale the image nicely /
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;">
|
||||
|
||||
<h1 class="button button5"> RESUME PARSER </h1>
|
||||
<br> <br>
|
||||
<a class="button button5"href="/">HOME</a>
|
||||
|
||||
|
||||
|
||||
<form action="/upload_resume" method="POST" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
<div class="custom-file">
|
||||
<input type="file" class="button button5" name="image" id="image" accept=".doc,.docx,.pdf"> <br> <br><br>
|
||||
<div class="bg"></div>
|
||||
<input class="button button5" type="submit">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form action="{{ url_for('Download_resume') }}" method="GET">
|
||||
<br><br> <input type="submit" class="button button5" value="Download"></form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height:100%;
|
||||
font-family: 'Helvetica';
|
||||
background-color:#000000;
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
text-align:center;
|
||||
letter-spacing:1.4px;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user