Esvanth commited on
Commit
30b6a05
·
1 Parent(s): 0052e9f

Fix cache error: return only string output, not module object

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -302,10 +302,10 @@ exists and applies a fix to make the results fair.
302
  with redirect_stdout(buf):
303
  spec.loader.exec_module(m)
304
  m.main()
305
- return buf.getvalue(), m
306
 
307
  with st.spinner("Running task2_segmentation.py..."):
308
- t2_output, t2_mod = _run_task2()
309
 
310
  st.markdown("<div class='step-box'><span class='step-num'>2</span>"
311
  "<b>Terminal output from task2_segmentation.py</b></div>",
@@ -372,10 +372,10 @@ how each algorithm explores the network step by step.
372
  with redirect_stdout(buf):
373
  spec.loader.exec_module(m)
374
  m.main()
375
- return buf.getvalue(), m
376
 
377
  with st.spinner("Running task3_4_routing.py..."):
378
- t3_output, t3_mod = _run_task3()
379
 
380
  st.markdown("<div class='step-box'><span class='step-num'>2</span>"
381
  "<b>Terminal output from task3_4_routing.py</b></div>",
 
302
  with redirect_stdout(buf):
303
  spec.loader.exec_module(m)
304
  m.main()
305
+ return buf.getvalue()
306
 
307
  with st.spinner("Running task2_segmentation.py..."):
308
+ t2_output = _run_task2()
309
 
310
  st.markdown("<div class='step-box'><span class='step-num'>2</span>"
311
  "<b>Terminal output from task2_segmentation.py</b></div>",
 
372
  with redirect_stdout(buf):
373
  spec.loader.exec_module(m)
374
  m.main()
375
+ return buf.getvalue()
376
 
377
  with st.spinner("Running task3_4_routing.py..."):
378
+ t3_output = _run_task3()
379
 
380
  st.markdown("<div class='step-box'><span class='step-num'>2</span>"
381
  "<b>Terminal output from task3_4_routing.py</b></div>",