tdoehmen commited on
Commit
1637f29
·
1 Parent(s): 9f23392
Files changed (1) hide show
  1. app.py +8 -3
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
- sys.path.append('duckdb-nsql')
 
 
 
10
 
11
  # Import necessary functions and classes from predict.py and evaluate.py
12
- from eval.predict import cli as predict_cli, predict, console, get_manifest, DefaultLoader, PROMPT_FORMATTERS
13
- from eval.evaluate import cli as evaluate_cli, evaluate, compute_metrics, get_to_print
 
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