luulinh90s commited on
Commit
8d4f7ad
·
1 Parent(s): a11a828
Files changed (3) hide show
  1. app.py +4 -0
  2. templates/cot_intro.html +2 -1
  3. templates/pos_intro.html +1 -1
app.py CHANGED
@@ -377,5 +377,9 @@ def send_visualization(filename):
377
  logger.info(f"Serving file from directory: {directory}, filename: {file_name}")
378
  return send_from_directory(directory, file_name)
379
 
 
 
 
 
380
  if __name__ == "__main__":
381
  app.run(host="0.0.0.0", port=7860, debug=True)
 
377
  logger.info(f"Serving file from directory: {directory}, filename: {file_name}")
378
  return send_from_directory(directory, file_name)
379
 
380
+ @app.route('/visualizations/<path:filename>')
381
+ def send_examples(filename):
382
+ return send_from_directory('', filename)
383
+
384
  if __name__ == "__main__":
385
  app.run(host="0.0.0.0", port=7860, debug=True)
templates/cot_intro.html CHANGED
@@ -107,7 +107,8 @@
107
  <p>This step just inputs the Statement and the final simplified table to the model to ask for the verification.</p>
108
  </div>
109
  <h2>Chain-of-Table Example</h2>
110
- <iframe src="https://huggingface.co/spaces/luulinh90s/Tabular-LLM-Study-Forward-Simulation/blob/main/htmls_COT/TP/test-0.html"></iframe>
 
111
  <h2>Final Prediction: TRUE</h2>
112
  <button onclick="location.href='{{ url_for('experiment', session_id=session_id) }}'">Proceed to Experiment</button>
113
  </div>
 
107
  <p>This step just inputs the Statement and the final simplified table to the model to ask for the verification.</p>
108
  </div>
109
  <h2>Chain-of-Table Example</h2>
110
+ <!-- <iframe src="htmls_COT/TP/test-0.html"></iframe>-->
111
+ <iframe src="{{ url_for('send_examples', filename='htmls_COT/TP/test-0.html') }}"></iframe>
112
  <h2>Final Prediction: TRUE</h2>
113
  <button onclick="location.href='{{ url_for('experiment', session_id=session_id) }}'">Proceed to Experiment</button>
114
  </div>
templates/pos_intro.html CHANGED
@@ -104,7 +104,7 @@
104
  <p>This step filters the table to only include rows where the opposing team didn't score any points.</p>
105
  </div>
106
  <!-- <div class="step">-->
107
- <div class="step highl ighted-step">
108
  <div class="step-title">Step 3: Use a `CASE` statement to return TRUE if the number of rows is equal to 4, otherwise return FALSE.</div>
109
  <p>This step checks if there are exactly 4 games where the opposing team was scoreless, as stated in the verification statement.</p>
110
  <p>In the final intermediate, only count the rows with actual data. The top row, which contains the column headers (like titles or labels for the columns), is not part of the count. So, if you see only the header row with no data beneath it, the table has 0 rows. If you see one row beneath the header, the table has 1 row." </p>
 
104
  <p>This step filters the table to only include rows where the opposing team didn't score any points.</p>
105
  </div>
106
  <!-- <div class="step">-->
107
+ <div class="step highlighted-step">
108
  <div class="step-title">Step 3: Use a `CASE` statement to return TRUE if the number of rows is equal to 4, otherwise return FALSE.</div>
109
  <p>This step checks if there are exactly 4 games where the opposing team was scoreless, as stated in the verification statement.</p>
110
  <p>In the final intermediate, only count the rows with actual data. The top row, which contains the column headers (like titles or labels for the columns), is not part of the count. So, if you see only the header row with no data beneath it, the table has 0 rows. If you see one row beneath the header, the table has 1 row." </p>