samuelam commited on
Commit
6b8fd7d
1 Parent(s): 3891395

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,13 +6,14 @@ from email.utils import parseaddr
6
  import gradio as gr
7
  import pandas as pd
8
  from datasets import load_dataset
 
9
  from apscheduler.schedulers.background import BackgroundScheduler
10
  from huggingface_hub import HfApi
11
  from content import format_error, format_warning, format_log, TITLE
12
 
13
  # Placeholder for the question_scorer function
14
  def question_scorer(prediction, gold_answer):
15
- return 1 if prediction == gold_answer else 0
16
 
17
 
18
  # Constants and Configuration
 
6
  import gradio as gr
7
  import pandas as pd
8
  from datasets import load_dataset
9
+ from evaluation.evaluator import question_scorer as eval_scorer
10
  from apscheduler.schedulers.background import BackgroundScheduler
11
  from huggingface_hub import HfApi
12
  from content import format_error, format_warning, format_log, TITLE
13
 
14
  # Placeholder for the question_scorer function
15
  def question_scorer(prediction, gold_answer):
16
+ return eval_scorer(prediction, gold_answer)
17
 
18
 
19
  # Constants and Configuration