Update src/v2/streamlit_app_modified.py
Browse files- src/v2/streamlit_app_modified.py +32 -32
src/v2/streamlit_app_modified.py
CHANGED
|
@@ -50,45 +50,45 @@ if notebook:
|
|
| 50 |
|
| 51 |
results_tab, grammar_tab = st.tabs(['Execution', 'Grammar/Fact'])
|
| 52 |
|
| 53 |
-
with results_tab:
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
| 92 |
|
| 93 |
with grammar_tab:
|
| 94 |
try:
|
|
|
|
| 50 |
|
| 51 |
results_tab, grammar_tab = st.tabs(['Execution', 'Grammar/Fact'])
|
| 52 |
|
| 53 |
+
# with results_tab:
|
| 54 |
+
# with st.spinner("π Executing notebook..."):
|
| 55 |
+
# try:
|
| 56 |
+
# notebook_dir_path = Path("/tmp/Notebook")
|
| 57 |
+
# notebook_files = [f for f in notebook_dir_path.iterdir() if f.suffix == '.ipynb']
|
| 58 |
|
| 59 |
+
# if not notebook_files:
|
| 60 |
+
# st.error("No notebook found in directory")
|
| 61 |
+
# else:
|
| 62 |
+
# notebook_path = notebook_files[0]
|
| 63 |
+
# st.write(f'π Processing notebook: {notebook_path.name}')
|
| 64 |
|
| 65 |
+
# # Show available datasets
|
| 66 |
+
# dataset_files = [f for f in notebook_dir_path.iterdir()
|
| 67 |
+
# if f.suffix.lower() in ['.csv', '.xlsx', '.xls', '.json', '.txt', '.parquet']]
|
| 68 |
|
| 69 |
+
# if dataset_files:
|
| 70 |
+
# st.info(f"π Available datasets: {', '.join([f.name for f in dataset_files])}")
|
| 71 |
|
| 72 |
+
# results = main_call(notebook_path)
|
| 73 |
|
| 74 |
+
# # Display results in a more user-friendly way
|
| 75 |
+
# if isinstance(results, dict):
|
| 76 |
+
# col1, col2 = st.columns([1, 3])
|
| 77 |
+
# with col1:
|
| 78 |
+
# if results['status'] == 'Pass':
|
| 79 |
+
# st.success("β
**Status: PASSED**")
|
| 80 |
+
# else:
|
| 81 |
+
# st.error("β **Status: FAILED**")
|
| 82 |
|
| 83 |
+
# with col2:
|
| 84 |
+
# st.write(f"**Notebook:** {results['notebook']}")
|
| 85 |
+
# if results['error_message']:
|
| 86 |
+
# st.error(f"**Error:** {results['error_message']}")
|
| 87 |
+
# else:
|
| 88 |
+
# st.dataframe(results)
|
| 89 |
|
| 90 |
+
# except Exception as e:
|
| 91 |
+
# st.error(f"β Error processing notebook: {str(e)}")
|
| 92 |
|
| 93 |
with grammar_tab:
|
| 94 |
try:
|