heymenn commited on
Commit
6fb4866
·
verified ·
1 Parent(s): 20436a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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'"{problem_description[:80]}" using "{tech_a_name}" AND "{tech_b_name}" patent OR research paper'
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('link', '#')}
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
  }