mgokg commited on
Commit
a160b6a
·
verified ·
1 Parent(s): f7f3271

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -72,9 +72,9 @@ 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 = "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:
@@ -149,7 +149,7 @@ with gr.Blocks(css=custom_css) as demo:
149
  button = gr.Button("Senden")
150
 
151
  # Connect the button to the function
152
- button.click(fn=ground_search, inputs=ort_input, outputs=details_output)
153
 
154
  # Launch the Gradio application
155
  demo.launch()
 
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://specialist-it.de/bots.php?json={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:
 
149
  button = gr.Button("Senden")
150
 
151
  # Connect the button to the function
152
+ button.click(fn=query, inputs=ort_input, outputs=details_output)
153
 
154
  # Launch the Gradio application
155
  demo.launch()