Skip to content

Commit fa9954a

Browse files
committed
📝 Docs: Add instructions to launch the streamlit app from colab on the two demo notebooks
1 parent 5340444 commit fa9954a

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

docs/vuegen_basic_case_study.ipynb

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -117,21 +117,9 @@
117117
},
118118
{
119119
"cell_type": "code",
120-
"execution_count": 2,
120+
"execution_count": null,
121121
"metadata": {},
122-
"outputs": [
123-
{
124-
"ename": "ModuleNotFoundError",
125-
"evalue": "No module named 'vuegen'",
126-
"output_type": "error",
127-
"traceback": [
128-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
129-
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
130-
"Cell \u001b[0;32mIn[2], line 4\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mos\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01myaml\u001b[39;00m\n\u001b[0;32m----> 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mvuegen\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m report_generator\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mvuegen\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m get_logger, load_yaml_config\n\u001b[1;32m 7\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m IN_COLAB:\n",
131-
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'vuegen'"
132-
]
133-
}
134-
],
122+
"outputs": [],
135123
"source": [
136124
"# Imports\n",
137125
"import os\n",
@@ -163,7 +151,9 @@
163151
"cell_type": "markdown",
164152
"metadata": {},
165153
"source": [
166-
"### 1.1. Streamlit report"
154+
"### 1.1. Streamlit report\n",
155+
"\n",
156+
"To launch the Streamlit web application from Colab, open the generated URL and copy the localtunnel entry point IP into the corresponding field on the opened page. Once submited, you will be redirected to your Streamlit web application."
167157
]
168158
},
169159
{
@@ -199,7 +189,9 @@
199189
"elif run_streamlit:\n",
200190
" # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n",
201191
" print(\"Password/Enpoint IP for localtunnel is:\",urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n",
192+
" # Run the Streamlit app in the background\n",
202193
" !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n",
194+
" # Expose the Streamlit app on port 8501\n",
203195
" !npx localtunnel --port 8501 --subdomain vuegen-demo\n",
204196
"else:\n",
205197
" print(\"Streamlit report not executed, set run_streamlit to True to run the report\")"
@@ -319,7 +311,9 @@
319311
"cell_type": "markdown",
320312
"metadata": {},
321313
"source": [
322-
"### 2.5. Stremlit report with the extended configuration file"
314+
"### 2.5. Stremlit report with the extended configuration file\n",
315+
"\n",
316+
"To launch the Streamlit web application from Colab, open the generated URL and copy the localtunnel entry point IP into the corresponding field on the opened page. Once submited, you will be redirected to your Streamlit web application."
323317
]
324318
},
325319
{
@@ -347,7 +341,9 @@
347341
"elif run_streamlit:\n",
348342
" # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n",
349343
" print(\"Password/Enpoint IP for localtunnel is:\",urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n",
344+
" # Run the Streamlit app in the background\n",
350345
" !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n",
346+
" # Expose the Streamlit app on port 8501\n",
351347
" !npx localtunnel --port 8501 --subdomain vuegen-demo\n",
352348
"else:\n",
353349
" print(\"Streamlit report not executed, set run_streamlit to True to run the report\")"

docs/vuegen_case_study_earth_microbiome.ipynb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,9 @@
13691369
"cell_type": "markdown",
13701370
"metadata": {},
13711371
"source": [
1372-
"### 4.1. Streamlit report"
1372+
"### 4.1. Streamlit report\n",
1373+
"\n",
1374+
"To launch the Streamlit web application from Colab, open the generated URL and copy the localtunnel entry point IP into the corresponding field on the opened page. Once submited, you will be redirected to your Streamlit web application."
13731375
]
13741376
},
13751377
{
@@ -1397,7 +1399,9 @@
13971399
"elif run_streamlit:\n",
13981400
" # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n",
13991401
" print(\"Password/Enpoint IP for localtunnel is:\",urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n",
1402+
" # Run the Streamlit app in the background\n",
14001403
" !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n",
1404+
" # Expose the Streamlit app on port 8501\n",
14011405
" !npx localtunnel --port 8501 --subdomain vuegen-demo\n",
14021406
"else:\n",
14031407
" print(\"Streamlit report not executed, set run_streamlit to True to run the report\")"
@@ -1553,7 +1557,9 @@
15531557
"cell_type": "markdown",
15541558
"metadata": {},
15551559
"source": [
1556-
"### 5.5. Stremlit report with the extended configuration file"
1560+
"### 5.5. Stremlit report with the extended configuration file\n",
1561+
"\n",
1562+
"To launch the Streamlit web application from Colab, open the generated URL and copy the localtunnel entry point IP into the corresponding field on the opened page. Once submited, you will be redirected to your Streamlit web application."
15571563
]
15581564
},
15591565
{
@@ -1581,7 +1587,9 @@
15811587
"elif run_streamlit:\n",
15821588
" # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n",
15831589
" print(\"Password/Enpoint IP for localtunnel is:\",urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n",
1590+
" # Run the Streamlit app in the background\n",
15841591
" !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n",
1592+
" # Expose the Streamlit app on port 8501\n",
15851593
" !npx localtunnel --port 8501 --subdomain vuegen-demo\n",
15861594
"else:\n",
15871595
" print(\"Streamlit report not executed, set run_streamlit to True to run the report\")"

0 commit comments

Comments
 (0)