File size: 547 Bytes
c8440e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from customgraph import get_data
import json


def scrape_parse_combine(openai_key):
    # Load JSON data from a file
    with open('pdf_data.json', 'r') as json_file:
        data = json.load(json_file)


    if "pdf_doc" in data.keys():
        data["startup_info"] = get_data(data["pdf_doc"].encode("utf8").decode("utf8"),
                                        "http://" + data["website_url"].encode("utf8").decode("utf8"),openai_key)

    with open('pdf_data.json', 'w') as json_file:
            json.dump(data, json_file)