heymenn commited on
Commit
0cbfa83
·
verified ·
1 Parent(s): 0369686

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -163,7 +163,6 @@ def search_solutions_api(problem_description, technologies):
163
  # OR potentially just a list: [{'title': '...', 'link': '...', 'snippet': '...'}]
164
  # Adjust parsing based on the *actual* API response structure
165
  api_response = response.json()
166
- print(f"API RESPONSE = {api_response}")
167
 
168
  # --- Adapt the following lines based on the API's actual JSON structure ---
169
  search_results = []
@@ -177,7 +176,7 @@ def search_solutions_api(problem_description, technologies):
177
 
178
  # Store results, ensuring keys like 'title' and 'link' exist
179
  results[clean_tech_name] = [
180
- {'title': r.get('title', 'N/A'), 'link': r.get('link', '#')}
181
  for r in search_results if isinstance(r, dict) # Basic validation
182
  ]
183
 
 
163
  # OR potentially just a list: [{'title': '...', 'link': '...', 'snippet': '...'}]
164
  # Adjust parsing based on the *actual* API response structure
165
  api_response = response.json()
 
166
 
167
  # --- Adapt the following lines based on the API's actual JSON structure ---
168
  search_results = []
 
176
 
177
  # Store results, ensuring keys like 'title' and 'link' exist
178
  results[clean_tech_name] = [
179
+ {'title': r.get('title', 'N/A'), 'link': r.get('url', '#')}
180
  for r in search_results if isinstance(r, dict) # Basic validation
181
  ]
182