luulinh90s
commited on
Commit
·
1a7f6aa
1
Parent(s):
7f12386
update
Browse files
app.py
CHANGED
@@ -109,7 +109,6 @@ def index():
|
|
109 |
return "An error occurred", 500
|
110 |
return render_template('index.html')
|
111 |
|
112 |
-
|
113 |
@app.route('/experiment/<username>/<sample_index>/<seed>/<filename>', methods=['GET'])
|
114 |
def experiment(username, sample_index, seed, filename):
|
115 |
try:
|
@@ -134,15 +133,15 @@ def experiment(username, sample_index, seed, filename):
|
|
134 |
else:
|
135 |
visualization_dirs = VISUALIZATION_DIRS_PLAN_OF_SQLS
|
136 |
|
137 |
-
logger.info(f"
|
138 |
|
139 |
# Find the correct visualization path
|
140 |
for category, dir_path in visualization_dirs.items():
|
141 |
absolute_dir_path = os.path.abspath(dir_path)
|
142 |
-
for file
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
|
147 |
if not visualization_path:
|
148 |
logger.error(
|
|
|
109 |
return "An error occurred", 500
|
110 |
return render_template('index.html')
|
111 |
|
|
|
112 |
@app.route('/experiment/<username>/<sample_index>/<seed>/<filename>', methods=['GET'])
|
113 |
def experiment(username, sample_index, seed, filename):
|
114 |
try:
|
|
|
133 |
else:
|
134 |
visualization_dirs = VISUALIZATION_DIRS_PLAN_OF_SQLS
|
135 |
|
136 |
+
logger.info(f"Checking directories for method: {method}")
|
137 |
|
138 |
# Find the correct visualization path
|
139 |
for category, dir_path in visualization_dirs.items():
|
140 |
absolute_dir_path = os.path.abspath(dir_path)
|
141 |
+
logger.info(f"Checking directory: {absolute_dir_path} for file: {visualization_file}")
|
142 |
+
if visualization_file.strip() in os.listdir(absolute_dir_path):
|
143 |
+
visualization_path = os.path.join(category, visualization_file)
|
144 |
+
break
|
145 |
|
146 |
if not visualization_path:
|
147 |
logger.error(
|