Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SadhulaSaiKumar 70199f7806 Add 'readme.md' 1 yıl önce
Attendence Upload files to 'Attendence' 2 yıl önce
Business_cards Update 'Business_cards/Business_cards.py' 2 yıl önce
Demand_forcasting Upload files to 'Demand_forcasting' 2 yıl önce
Electrol Upload files to 'Electrol' 1 yıl önce
Events Upload files to 'Events/src' 2 yıl önce
Invoice_parser Upload files to 'Invoice_parser' 2 yıl önce
Resume_parser Update 'Resume_parser/AD11.csv' 2 yıl önce
Supportgpt Upload files to 'Supportgpt' 1 yıl önce
chatbot Upload files to 'chatbot/userdetails' 2 yıl önce
readme.md Add 'readme.md' 1 yıl önce

readme.md

A sample of input data can be generate from below code for invoice,resume,Businesscard,Attendence.

import base64 import json empty=[]

found=“file_path” 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--” + found) 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

dictionary = dt4.to_dict(orient=“index”) dictionary[1] payload1 = json.dumps(dictionary[1])

print(payload1)

note

when we have to test code using postman after give url in body select json option then add [] to the text generated from payload1 paste in the body and click send button