mgokg commited on
Commit
9a43e1d
·
verified ·
1 Parent(s): daa8b98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -37,8 +37,8 @@ def get_impressum_text(search_term):
37
  url = f"https://cse.google.com/cse?cx=77f1602c0ff764edb&q=impressum {search_term}"
38
  response = requests.get(url, headers=headers)
39
  soup = BeautifulSoup(response.content, 'html.parser')
40
- impressum_div = soup.find('div', class_='MjjYud')
41
- return impressum_div
42
 
43
  if 'items' in search_results:
44
  for item in search_results['items']:
@@ -103,8 +103,8 @@ def predict(prompt):
103
  # Create the Gradio interface
104
  with gr.Blocks(css=custom_css) as demo:
105
  with gr.Row():
106
- details_output = gr.Markdown(label="answer", elem_id="md")
107
- #details_output = gr.Textbox(label="Ausgabe", value = f"\n\n\n\n")
108
  with gr.Row():
109
  ort_input = gr.Textbox(label="prompt", placeholder="ask anything...")
110
  with gr.Row():
 
37
  url = f"https://cse.google.com/cse?cx=77f1602c0ff764edb&q=impressum {search_term}"
38
  response = requests.get(url, headers=headers)
39
  soup = BeautifulSoup(response.content, 'html.parser')
40
+ impressum_div = soup.find('body')
41
+ return impressum_div.text
42
 
43
  if 'items' in search_results:
44
  for item in search_results['items']:
 
103
  # Create the Gradio interface
104
  with gr.Blocks(css=custom_css) as demo:
105
  with gr.Row():
106
+ #details_output = gr.Markdown(label="answer", elem_id="md")
107
+ details_output = gr.Textbox(label="Ausgabe", value = f"\n\n\n\n")
108
  with gr.Row():
109
  ort_input = gr.Textbox(label="prompt", placeholder="ask anything...")
110
  with gr.Row():