Commit
·
46c86e4
1
Parent(s):
e56d73c
update
Browse files
app.py
CHANGED
|
@@ -136,10 +136,17 @@ def experiment(username, sample_index, seed, filename):
|
|
| 136 |
visualization_path = None
|
| 137 |
|
| 138 |
# Determine the correct visualization directory based on the method
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
if method == "Chain-of-Table":
|
| 140 |
visualization_dirs = VISUALIZATION_DIRS_CHAIN_OF_TABLE
|
|
|
|
| 141 |
else:
|
| 142 |
visualization_dirs = VISUALIZATION_DIRS_PLAN_OF_SQLS
|
|
|
|
| 143 |
|
| 144 |
logger.info(f"Checking directories for method: {method}")
|
| 145 |
|
|
@@ -148,7 +155,7 @@ def experiment(username, sample_index, seed, filename):
|
|
| 148 |
absolute_dir_path = os.path.abspath(dir_path)
|
| 149 |
logger.info(f"Checking directory: {absolute_dir_path} for file: {visualization_file}")
|
| 150 |
if visualization_file.strip() in os.listdir(absolute_dir_path):
|
| 151 |
-
visualization_path = os.path.join(category, visualization_file)
|
| 152 |
break
|
| 153 |
|
| 154 |
if not visualization_path:
|
|
|
|
| 136 |
visualization_path = None
|
| 137 |
|
| 138 |
# Determine the correct visualization directory based on the method
|
| 139 |
+
# if method == "Chain-of-Table":
|
| 140 |
+
# visualization_dirs = VISUALIZATION_DIRS_CHAIN_OF_TABLE
|
| 141 |
+
# else:
|
| 142 |
+
# visualization_dirs = VISUALIZATION_DIRS_PLAN_OF_SQLS
|
| 143 |
+
|
| 144 |
if method == "Chain-of-Table":
|
| 145 |
visualization_dirs = VISUALIZATION_DIRS_CHAIN_OF_TABLE
|
| 146 |
+
vis_dir = 'htmls_COT'
|
| 147 |
else:
|
| 148 |
visualization_dirs = VISUALIZATION_DIRS_PLAN_OF_SQLS
|
| 149 |
+
vis_dir = 'visualizations'
|
| 150 |
|
| 151 |
logger.info(f"Checking directories for method: {method}")
|
| 152 |
|
|
|
|
| 155 |
absolute_dir_path = os.path.abspath(dir_path)
|
| 156 |
logger.info(f"Checking directory: {absolute_dir_path} for file: {visualization_file}")
|
| 157 |
if visualization_file.strip() in os.listdir(absolute_dir_path):
|
| 158 |
+
visualization_path = os.path.join(vis_dir, category, visualization_file)
|
| 159 |
break
|
| 160 |
|
| 161 |
if not visualization_path:
|