Spaces:
Sleeping
Sleeping
Fix check solution
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import re
|
2 |
-
import os
|
3 |
import spaces
|
4 |
import gradio as gr
|
5 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
@@ -20,7 +19,6 @@ eureka5_test_data = load_dataset(
|
|
20 |
'gsarti/eureka-rebus', 'llm_sft',
|
21 |
data_files=["id_test.jsonl", "ood_test.jsonl"],
|
22 |
split = "train",
|
23 |
-
token=os.environ["HF_TOKEN"]
|
24 |
)
|
25 |
|
26 |
OUTPUTS_BASE_URL = "https://raw.githubusercontent.com/gsarti/verbalized-rebus/main/outputs/"
|
@@ -189,7 +187,7 @@ with gr.Blocks(css=custom_css) as demo:
|
|
189 |
|
190 |
def check_solution(solution, correct_solution):
|
191 |
solution = unidecode(extract(solution))
|
192 |
-
correct_solution = unidecode(extract(correct_solution
|
193 |
if solution == correct_solution:
|
194 |
gr.Info(gettext("CorrectSolutionMsg"))
|
195 |
else:
|
|
|
1 |
import re
|
|
|
2 |
import spaces
|
3 |
import gradio as gr
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
19 |
'gsarti/eureka-rebus', 'llm_sft',
|
20 |
data_files=["id_test.jsonl", "ood_test.jsonl"],
|
21 |
split = "train",
|
|
|
22 |
)
|
23 |
|
24 |
OUTPUTS_BASE_URL = "https://raw.githubusercontent.com/gsarti/verbalized-rebus/main/outputs/"
|
|
|
187 |
|
188 |
def check_solution(solution, correct_solution):
|
189 |
solution = unidecode(extract(solution))
|
190 |
+
correct_solution = unidecode(extract(correct_solution))
|
191 |
if solution == correct_solution:
|
192 |
gr.Info(gettext("CorrectSolutionMsg"))
|
193 |
else:
|