test
Browse files
app.py
CHANGED
@@ -6,13 +6,18 @@ from datetime import datetime
|
|
6 |
import json
|
7 |
|
8 |
# Add the duckdb-nsql directory to the Python path
|
9 |
-
|
|
|
|
|
|
|
10 |
|
11 |
# Import necessary functions and classes from predict.py and evaluate.py
|
12 |
-
from eval.predict import
|
13 |
-
from eval.
|
|
|
14 |
from eval.evaluate import test_suite_evaluation, read_tables_json
|
15 |
|
|
|
16 |
def run_evaluation(model_name):
|
17 |
results = []
|
18 |
|
|
|
6 |
import json
|
7 |
|
8 |
# Add the duckdb-nsql directory to the Python path
|
9 |
+
current_dir = Path(__file__).resolve().parent
|
10 |
+
duckdb_nsql_dir = current_dir / 'duckdb-nsql'
|
11 |
+
eval_dir = duckdb_nsql_dir / 'eval'
|
12 |
+
sys.path.extend([str(current_dir), str(duckdb_nsql_dir), str(eval_dir)])
|
13 |
|
14 |
# Import necessary functions and classes from predict.py and evaluate.py
|
15 |
+
from eval.predict import predict, console, get_manifest, DefaultLoader
|
16 |
+
from eval.constants import PROMPT_FORMATTERS
|
17 |
+
from eval.evaluate import evaluate, compute_metrics, get_to_print
|
18 |
from eval.evaluate import test_suite_evaluation, read_tables_json
|
19 |
|
20 |
+
|
21 |
def run_evaluation(model_name):
|
22 |
results = []
|
23 |
|