manabb commited on
Commit
16e795d
·
verified ·
1 Parent(s): 24c5190

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -141,10 +141,13 @@ def loop_function(df):
141
 
142
  if i == 1:
143
  try:
144
- text += "As per proposal, "+key + " : "+value+"\n\n"
 
 
 
145
  rr = generate_response(manual_rules, proposal_details)
146
- text += rr + "\n\n" # FIXED: accumulate
147
- text +="===============================================================\n"
148
  yield text
149
  time.sleep(3)
150
  except Exception as e:
@@ -204,12 +207,13 @@ with gr.Blocks(css=css) as demo:
204
  elem_id="admin-file"
205
  )
206
  run_btn = gr.Button("Check compliance", elem_id="compliance-btn")
207
- out = gr.Textbox(lines=15, label="Compliance Result",elem_id="compliance-out")
 
208
  run_btn.click(check_compliance, inputs=inp, outputs=out)
209
  with gr.TabItem("Compliance Check of user technical doc"):
210
  with gr.Row():
211
  inp_tech = gr.File(
212
- label="Upload Admin File in word i.e. pdf format",
213
  file_types=[".pdf"],
214
  elem_id="admin-file"
215
  )
 
141
 
142
  if i == 1:
143
  try:
144
+ text += """
145
+ <div style="color: white; background: black; padding: 10px; font-size: 12px;">
146
+ """
147
+ text += "<h1>As per proposal, "+key + " : "+value+"</h1>"
148
  rr = generate_response(manual_rules, proposal_details)
149
+ text += "<p>"+rr + "</p"
150
+ text += "</div>"
151
  yield text
152
  time.sleep(3)
153
  except Exception as e:
 
207
  elem_id="admin-file"
208
  )
209
  run_btn = gr.Button("Check compliance", elem_id="compliance-btn")
210
+ out = gr.HTML(label="Compliance Result")
211
+ #out = gr.Textbox(lines=15, label="Compliance Result",elem_id="compliance-out")
212
  run_btn.click(check_compliance, inputs=inp, outputs=out)
213
  with gr.TabItem("Compliance Check of user technical doc"):
214
  with gr.Row():
215
  inp_tech = gr.File(
216
+ label="Upload technical document in pdf format",
217
  file_types=[".pdf"],
218
  elem_id="admin-file"
219
  )