Spaces:
Running
Running
table params
Browse files- evaluation_logic.py +1 -9
evaluation_logic.py
CHANGED
@@ -63,18 +63,10 @@ def run_prediction(model_name, prompt_format, output_file):
|
|
63 |
if len(table_params) == 0:
|
64 |
yield f"[red] WARNING: No tables found for {db_id} [/red]"
|
65 |
|
66 |
-
# Convert Table objects to dictionaries if they're already instantiated
|
67 |
-
processed_table_params = []
|
68 |
-
for table in table_params:
|
69 |
-
if isinstance(table, Table):
|
70 |
-
processed_table_params.append(table.dict())
|
71 |
-
else:
|
72 |
-
processed_table_params.append(table)
|
73 |
-
|
74 |
text_to_sql_inputs.append(TextToSQLParams(
|
75 |
instruction=question,
|
76 |
database=db_id,
|
77 |
-
tables=
|
78 |
))
|
79 |
|
80 |
# Generate SQL
|
|
|
63 |
if len(table_params) == 0:
|
64 |
yield f"[red] WARNING: No tables found for {db_id} [/red]"
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
text_to_sql_inputs.append(TextToSQLParams(
|
67 |
instruction=question,
|
68 |
database=db_id,
|
69 |
+
tables=table_params,
|
70 |
))
|
71 |
|
72 |
# Generate SQL
|