Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -194,7 +194,7 @@ def search_solutions_for_pairs(problem_description, top_pairs):
|
|
| 194 |
|
| 195 |
# Construct query for the API - include both tech names and "patent" / "research"
|
| 196 |
# Keep problem description concise
|
| 197 |
-
query = f'
|
| 198 |
|
| 199 |
params = {
|
| 200 |
'query': query,
|
|
@@ -224,7 +224,7 @@ def search_solutions_for_pairs(problem_description, top_pairs):
|
|
| 224 |
results[pair_key] = {
|
| 225 |
"score": pair_score, # Store pair score for context
|
| 226 |
"links": [
|
| 227 |
-
{'title': r.get('title', 'N/A'), 'link': r.get('
|
| 228 |
for r in search_results if isinstance(r, dict)
|
| 229 |
]
|
| 230 |
}
|
|
|
|
| 194 |
|
| 195 |
# Construct query for the API - include both tech names and "patent" / "research"
|
| 196 |
# Keep problem description concise
|
| 197 |
+
query = f'{problem_description} using {tech_a_name} AND {tech_b_name} patent OR research paper'
|
| 198 |
|
| 199 |
params = {
|
| 200 |
'query': query,
|
|
|
|
| 224 |
results[pair_key] = {
|
| 225 |
"score": pair_score, # Store pair score for context
|
| 226 |
"links": [
|
| 227 |
+
{'title': r.get('title', 'N/A'), 'link': r.get('url', '#')}
|
| 228 |
for r in search_results if isinstance(r, dict)
|
| 229 |
]
|
| 230 |
}
|