Pavankalyan commited on
Commit
5af0347
1 Parent(s): 4c51458

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -29,15 +29,15 @@ def chitti(query):
29
  answers_re_table.pop(idx)
30
 
31
  QA_input = {'question': query,'context': answers_re_table[0]}
32
- res1 = str(nlp(QA_input))
33
  QA_input = {'question': query,'context': answers_re_table[1]}
34
- res2 = str(nlp(QA_input))
35
- return [res1,res2]
36
 
37
  demo = gr.Interface(
38
  fn=chitti,
39
  inputs=["text"],
40
- outputs=["text","text"],
41
  allow_flagging = "manual",
42
  flagging_options = ["0","1","None"],
43
  flagging_callback=hf_writer
 
29
  answers_re_table.pop(idx)
30
 
31
  QA_input = {'question': query,'context': answers_re_table[0]}
32
+ res1 = nlp(QA_input)['answer']
33
  QA_input = {'question': query,'context': answers_re_table[1]}
34
+ res2 = nlp(QA_input)['answer']
35
+ return [res1,answers_re_table[0],res2,answers_re_table[1]]
36
 
37
  demo = gr.Interface(
38
  fn=chitti,
39
  inputs=["text"],
40
+ outputs=["text","text","text","text"],
41
  allow_flagging = "manual",
42
  flagging_options = ["0","1","None"],
43
  flagging_callback=hf_writer