heymenn commited on
Commit
2a63273
·
verified ·
1 Parent(s): d455ce2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,7 +17,7 @@ MODEL_NAME = 'all-MiniLM-L6-v2'
17
  CATEGORY_SIMILARITY_THRESHOLD = 0.3 # Threshold for *displaying* the best category match
18
  MAX_TECHNOLOGIES_TO_SHOW = 8 # Max technologies relevant to the problem (selected across ALL categories)
19
  MAX_TECHNOLOGY_PAIRS_TO_SEARCH = 5 # Max pairs (from the relevant tech) to use for solution search
20
- MAX_SEARCH_REFERENCES_PER_PAIR = 3 # Max references from the API per pair
21
  SEARCH_API_URL = "https://ychkhan-ptt-endpoints.hf.space/search"
22
 
23
  # --- Global Variables ---
@@ -359,7 +359,7 @@ def search_solutions_for_pairs(problem_description, top_pairs):
359
  # Keep problem description out of the API query unless the API is designed for it
360
  # query = f'"{tech_a_name}" AND "{tech_b_name}" patent OR research paper OR application'
361
  # More targeted query:
362
- query = f'Combining {tech_a_name} and {tech_b_name} for applications related to {problem_description}' # Use snippet of problem
363
 
364
  params = {
365
  'query': query,
 
17
  CATEGORY_SIMILARITY_THRESHOLD = 0.3 # Threshold for *displaying* the best category match
18
  MAX_TECHNOLOGIES_TO_SHOW = 8 # Max technologies relevant to the problem (selected across ALL categories)
19
  MAX_TECHNOLOGY_PAIRS_TO_SEARCH = 5 # Max pairs (from the relevant tech) to use for solution search
20
+ MAX_SEARCH_REFERENCES_PER_PAIR = 5 # Max references from the API per pair
21
  SEARCH_API_URL = "https://ychkhan-ptt-endpoints.hf.space/search"
22
 
23
  # --- Global Variables ---
 
359
  # Keep problem description out of the API query unless the API is designed for it
360
  # query = f'"{tech_a_name}" AND "{tech_b_name}" patent OR research paper OR application'
361
  # More targeted query:
362
+ query = f'research paper or patent on {tech_a_name} and {tech_b_name} of {problem_description}' # Use snippet of problem
363
 
364
  params = {
365
  'query': query,