Omnibus commited on
Commit
13d4e12
1 Parent(s): e72dcde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -154,14 +154,21 @@ def create_valid_filename(invalid_filename: str) -> str:
154
  def load_html(inp,title):
155
  ht=""
156
  if inp:
157
- for ea in inp:
 
158
  outp,prom=ea
159
  print(f'outp:: {outp}')
160
  print(f'prom:: {prom}')
161
- ht+=f"""<div class="div_box">
162
- <pre class="resp1">{outp}</pre>
163
- <pre class="resp2">{prom}</pre>
164
- </div>"""
 
 
 
 
 
 
165
  with open('index.html','r') as h:
166
  html=h.read()
167
  html = html.replace("$body",f"{ht}")
 
154
  def load_html(inp,title):
155
  ht=""
156
  if inp:
157
+ for i,ea in enumerate(inp):
158
+
159
  outp,prom=ea
160
  print(f'outp:: {outp}')
161
  print(f'prom:: {prom}')
162
+ if i == 0:
163
+ ht+=f"""<div class="div_box">
164
+ <pre class="resp1">{outp}</pre>
165
+ <pre class="resp2">{prom}</pre>
166
+ </div>"""
167
+ else:
168
+ ht+=f"""<div class="div_box">
169
+ <pre class="resp2">{outp}</pre>
170
+ <pre class="resp2">{prom}</pre>
171
+ </div>"""
172
  with open('index.html','r') as h:
173
  html=h.read()
174
  html = html.replace("$body",f"{ht}")