prithivMLmods commited on
Commit
b6f82d7
·
verified ·
1 Parent(s): d24e2bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -17,7 +17,7 @@ def search(query):
17
  with requests.Session() as session:
18
  resp = session.get(
19
  url="https://www.google.com/search",
20
- headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"},
21
  params={"q": term, "num": 3, "udm": 14},
22
  timeout=5,
23
  verify=None,
@@ -29,7 +29,7 @@ def search(query):
29
  link = result.find("a", href=True)
30
  link = link["href"]
31
  try:
32
- webpage = session.get(link, headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"}, timeout=5, verify=False)
33
  webpage.raise_for_status()
34
  visible_text = extract_text_from_webpage(webpage.text)
35
  if len(visible_text) > max_chars_per_page:
@@ -40,6 +40,7 @@ def search(query):
40
  return all_results
41
 
42
  client_gemma = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
 
43
  client_llama = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
44
 
45
  func_caller = []
 
17
  with requests.Session() as session:
18
  resp = session.get(
19
  url="https://www.google.com/search",
20
+ headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.0.0"},
21
  params={"q": term, "num": 3, "udm": 14},
22
  timeout=5,
23
  verify=None,
 
29
  link = result.find("a", href=True)
30
  link = link["href"]
31
  try:
32
+ webpage = session.get(link, headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.0.0"}, timeout=5, verify=False)
33
  webpage.raise_for_status()
34
  visible_text = extract_text_from_webpage(webpage.text)
35
  if len(visible_text) > max_chars_per_page:
 
40
  return all_results
41
 
42
  client_gemma = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
43
+ client_mixtral = InferenceClient("NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO")
44
  client_llama = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
45
 
46
  func_caller = []