Omnibus commited on
Commit
d6bdbe0
·
1 Parent(s): 48eac47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -30,8 +30,8 @@ def search_fn(query):
30
 
31
  with open("myfile.txt", "r") as file1:
32
  html_out = file1.read()
33
-
34
- return (html_out)
35
 
36
 
37
  def first():
@@ -39,11 +39,7 @@ def first():
39
  return out
40
 
41
  def test(inp):
42
- if inp != None or inp != "":
43
- html_out = inp
44
- pass
45
- with open("myfile.txt", "r") as file1:
46
- html_out = file1.read()
47
  style = '''
48
  .put-on-top{
49
  align-contents:center;
@@ -96,7 +92,7 @@ def test(inp):
96
  </style>
97
  <body>
98
  <div class=grid-mee>
99
- {html_out}
100
  </div>
101
  </body>
102
  </html>'''
@@ -111,6 +107,6 @@ with gr.Blocks() as app:
111
  btn = gr.Button()
112
  output = gr.HTML("""""")
113
 
114
- search_btn.click(search_fn,search_box,out_text)
115
  btn.click(first,None,output).then(test,input,output)
116
  app.launch()
 
30
 
31
  with open("myfile.txt", "r") as file1:
32
  html_out = file1.read()
33
+ out = test(html_out)
34
+ return out
35
 
36
 
37
  def first():
 
39
  return out
40
 
41
  def test(inp):
42
+
 
 
 
 
43
  style = '''
44
  .put-on-top{
45
  align-contents:center;
 
92
  </style>
93
  <body>
94
  <div class=grid-mee>
95
+ {inp}
96
  </div>
97
  </body>
98
  </html>'''
 
107
  btn = gr.Button()
108
  output = gr.HTML("""""")
109
 
110
+ search_btn.click(search_fn,search_box,out_put)
111
  btn.click(first,None,output).then(test,input,output)
112
  app.launch()