DrishtiSharma
commited on
Update main.py
Browse files
main.py
CHANGED
@@ -27,7 +27,7 @@ def generate_search_terms(input_text: str, number_of_generated_search_terms):
|
|
27 |
# search Google Patents using SerpApi
|
28 |
def search_on_google_patents(terms: list):
|
29 |
# multiple_queries = ';'.join(terms)
|
30 |
-
|
31 |
for search_term in terms:
|
32 |
params = {
|
33 |
"engine": "google_patents",
|
@@ -55,8 +55,8 @@ def search_on_google_patents(terms: list):
|
|
55 |
"patentUrl": result["serpapi_link"]
|
56 |
}
|
57 |
patents.append(patent)
|
58 |
-
|
59 |
-
return
|
60 |
|
61 |
# check similarity of patents using OpenAI
|
62 |
def check_similarity_of_patents(input_text, patents: list):
|
|
|
27 |
# search Google Patents using SerpApi
|
28 |
def search_on_google_patents(terms: list):
|
29 |
# multiple_queries = ';'.join(terms)
|
30 |
+
search_terms_patents ={}
|
31 |
for search_term in terms:
|
32 |
params = {
|
33 |
"engine": "google_patents",
|
|
|
55 |
"patentUrl": result["serpapi_link"]
|
56 |
}
|
57 |
patents.append(patent)
|
58 |
+
search_terms_patents[search_term] = patents
|
59 |
+
return search_terms_patents
|
60 |
|
61 |
# check similarity of patents using OpenAI
|
62 |
def check_similarity_of_patents(input_text, patents: list):
|