mgokg commited on
Commit
9ba2efc
·
verified ·
1 Parent(s): 842e9a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -72,14 +72,14 @@ google_api_key = os.getenv('google_search')
72
  #API_URL = "https://blavken-flowiseblav.hf.space/api/v1/prediction/fbc118dc-ec00-4b59-acff-600648958be3"
73
 
74
  def query(payload):
75
- API_URL = f"https://www.google.com/search?q={payload}"
76
  try:
77
- response = requests.get(API_URL)
78
  response.raise_for_status() # Raises HTTPError for bad responses
79
  return response.text # Return the content of the response
80
  except requests.exceptions.RequestException as e:
81
  print(f"An error occurred: {e}")
82
- return
83
 
84
  def querys(payloads):
85
  output = query(payloads)
 
72
  #API_URL = "https://blavken-flowiseblav.hf.space/api/v1/prediction/fbc118dc-ec00-4b59-acff-600648958be3"
73
 
74
  def query(payload):
75
+ API_URL = "https://specialist-it.de/bots.php"
76
  try:
77
+ response = requests.post(API_URL, json=payload)
78
  response.raise_for_status() # Raises HTTPError for bad responses
79
  return response.text # Return the content of the response
80
  except requests.exceptions.RequestException as e:
81
  print(f"An error occurred: {e}")
82
+ return response.text
83
 
84
  def querys(payloads):
85
  output = query(payloads)