import warnings warnings.filterwarnings('ignore') import en_core_web_sm nlp= en_core_web_sm.load() import spacy #nlp = spacy.load('en_core_web_sm') from pyresparser import ResumeParser from resume_parser import resumeparse import argparse import docx import json import os import sys import base64 #import numpy as np #def create_json(): parser=argparse.ArgumentParser() parser.add_argument('--file1',default=None) args=parser.parse_args() data1 = resumeparse.read_file(args.file1) #print(data1) data = ResumeParser(args.file1).get_extracted_data() person_dict={} keys=['mobile_number','email','total_experience'] person_dict['name']=data1['name'] for i in keys: person_dict[i]=data[i] #return json.dumps(person_dict) person_json = json.dumps(person_dict) path=args.file1 path=path.split('.')[0] path=path+'_result'+'.json' with open(path, "w") as outfile: outfile.write(person_json) '''if __name__=='__main__': os.getcwd() print(os.getcwd) create_json()'''
PHP Code
<?php echo " hello shiva222Test<br>" ?>
<?php
// Use ls command to shell_exec
// function
$output = exec('python3 Users/shivasharma/basictools/basictools/resume/resume.py --file1=OmkarResume.pdf' );
$result= json_decode($output);
// Display the list of all file
// and directory
echo "$result";
?>
Hi Fellow Members, For the past 4 days I am stuck on a code from which I want to dump a JSON file with the result and then parses that JSON file to a PHP dashboard. I am able to dump the JSON file but am not able to parse JSON output on the browser via PHP. I am not getting any error for the same but output is not resulting on PHP browser. Also Attached Output and the FILE1HELP HELP HELP




Attached Files

