mgokg commited on
Commit
c402c9e
·
verified ·
1 Parent(s): e7e2449

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -7,6 +7,13 @@ import os
7
 
8
  secreturl = os.environ.get('secret_url')
9
 
 
 
 
 
 
 
 
10
  def parse_links(prompt):
11
  #anfrage ='fill in the missing contact information. do not reference the json object. do not use html tags inside the json object. it must be valid json. do not return explanaitons or any other text. thanks for your efforts:)'
12
  Name=prompt
@@ -71,13 +78,7 @@ def parse_links(prompt):
71
  ergebnis =ergebnis.replace("[16]", " ")
72
  ergebnis =ergebnis.replace("[17]", " ")
73
  ergebnis =ergebnis.replace("[18]", " ")
74
-
75
-
76
-
77
-
78
-
79
  return ergebnis
80
-
81
  # return as Dictionary, for gr.JSON
82
  #return {"body_text": body_text}
83
 
@@ -95,7 +96,7 @@ def clear():
95
  with gr.Blocks() as demo:
96
  gr.Markdown("# Perplexica WebSearch")
97
  ort_input = gr.Textbox(label="Prompt", placeholder="ask anything...", value="")
98
- links_output = gr.Markdown(label="Antwort",elem_id="markdown_output {height: 500px; overflow: auto; }").style(height=500)
99
 
100
  with gr.Row():
101
  clearbutton = gr.Button("clear")
 
7
 
8
  secreturl = os.environ.get('secret_url')
9
 
10
+ custom_css = """
11
+ .gr-markdown {
12
+ height: 500px; /* Setze die Höhe auf 100 Pixel */
13
+ }
14
+ """
15
+
16
+
17
  def parse_links(prompt):
18
  #anfrage ='fill in the missing contact information. do not reference the json object. do not use html tags inside the json object. it must be valid json. do not return explanaitons or any other text. thanks for your efforts:)'
19
  Name=prompt
 
78
  ergebnis =ergebnis.replace("[16]", " ")
79
  ergebnis =ergebnis.replace("[17]", " ")
80
  ergebnis =ergebnis.replace("[18]", " ")
 
 
 
 
 
81
  return ergebnis
 
82
  # return as Dictionary, for gr.JSON
83
  #return {"body_text": body_text}
84
 
 
96
  with gr.Blocks() as demo:
97
  gr.Markdown("# Perplexica WebSearch")
98
  ort_input = gr.Textbox(label="Prompt", placeholder="ask anything...", value="")
99
+ links_output = gr.Markdown(label="Antwort",elem_id="markdown_output {height: 500px; overflow: auto; }", css=custom_css)
100
 
101
  with gr.Row():
102
  clearbutton = gr.Button("clear")