mgokg commited on
Commit
9f192ab
·
verified ·
1 Parent(s): a29fe08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -74,10 +74,10 @@ google_api_key = os.getenv('google_search')
74
  def query(payload):
75
  API_URL = f"https://www.bing.com/search?q={payload}"
76
  response = requests.get(API_URL)
77
- return response.text()
78
 
79
  def querys(payloads):
80
- output = query(f"{payloads}")
81
  print(output)
82
  #return result_text
83
 
@@ -144,7 +144,7 @@ with gr.Blocks(css=custom_css) as demo:
144
  button = gr.Button("Senden")
145
 
146
  # Connect the button to the function
147
- button.click(fn=querys, inputs=ort_input, outputs=details_output)
148
 
149
  # Launch the Gradio application
150
  demo.launch()
 
74
  def query(payload):
75
  API_URL = f"https://www.bing.com/search?q={payload}"
76
  response = requests.get(API_URL)
77
+ return response
78
 
79
  def querys(payloads):
80
+ output = query(payloads)
81
  print(output)
82
  #return result_text
83
 
 
144
  button = gr.Button("Senden")
145
 
146
  # Connect the button to the function
147
+ button.click(fn=query, inputs=ort_input, outputs=details_output)
148
 
149
  # Launch the Gradio application
150
  demo.launch()