tanveeshsingh commited on
Commit
8844699
·
1 Parent(s): 3bea114
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -41,7 +41,7 @@ def update_inputs(input_style):
41
  return gr.update(visible=True), gr.update(visible=False), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True)
42
 
43
 
44
- async def lynx(input_style_dropdown,document_input,question_input,answer_input):
45
  start_time = time.time()
46
  if input_style_dropdown=='QA format':
47
  client = AsyncOpenAI(
@@ -79,6 +79,7 @@ Your output should be in JSON FORMAT with the keys "REASONING" and "SCORE":
79
  else:
80
  results = 'NA'
81
  lynx_time = round(time.time() - start_time, 2) # Calculate time taken for Lynx
 
82
  return results, lynx_time
83
  # Function to judge reliability based on the selected input format
84
 
@@ -241,12 +242,8 @@ assistant:Yes, it is about $38Bn.""")
241
  outputs=[result_output,veritas_time_output]
242
  ).then(
243
  fn=lynx,
244
- inputs=[input_style_dropdown,document_input,question_input,answer_input],
245
  outputs=[lynx_output, lynx_time_output]
246
- ).then(
247
- fn=add_to_dataset,
248
- inputs=[input_style_dropdown,document_input,question_input,answer_input,claim_input,conversation_input,lynx_output,result_output],
249
- outputs=[]
250
  )
251
 
252
 
 
41
  return gr.update(visible=True), gr.update(visible=False), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True)
42
 
43
 
44
+ async def lynx(input_style_dropdown,document_input,question_input,answer_input,collinear_output):
45
  start_time = time.time()
46
  if input_style_dropdown=='QA format':
47
  client = AsyncOpenAI(
 
79
  else:
80
  results = 'NA'
81
  lynx_time = round(time.time() - start_time, 2) # Calculate time taken for Lynx
82
+ await add_to_dataset(input_style_dropdown,document_input,question_input,answer_input,claim_input,results,collinear_output)
83
  return results, lynx_time
84
  # Function to judge reliability based on the selected input format
85
 
 
242
  outputs=[result_output,veritas_time_output]
243
  ).then(
244
  fn=lynx,
245
+ inputs=[input_style_dropdown,document_input,question_input,answer_input,result_output],
246
  outputs=[lynx_output, lynx_time_output]
 
 
 
 
247
  )
248
 
249