|
117 | 117 | }, |
118 | 118 | { |
119 | 119 | "cell_type": "code", |
120 | | - "execution_count": 2, |
| 120 | + "execution_count": null, |
121 | 121 | "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": [], |
135 | 123 | "source": [ |
136 | 124 | "# Imports\n", |
137 | 125 | "import os\n", |
|
163 | 151 | "cell_type": "markdown", |
164 | 152 | "metadata": {}, |
165 | 153 | "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." |
167 | 157 | ] |
168 | 158 | }, |
169 | 159 | { |
|
199 | 189 | "elif run_streamlit:\n", |
200 | 190 | " # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n", |
201 | 191 | " 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", |
202 | 193 | " !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n", |
| 194 | + " # Expose the Streamlit app on port 8501\n", |
203 | 195 | " !npx localtunnel --port 8501 --subdomain vuegen-demo\n", |
204 | 196 | "else:\n", |
205 | 197 | " print(\"Streamlit report not executed, set run_streamlit to True to run the report\")" |
|
319 | 311 | "cell_type": "markdown", |
320 | 312 | "metadata": {}, |
321 | 313 | "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." |
323 | 317 | ] |
324 | 318 | }, |
325 | 319 | { |
|
347 | 341 | "elif run_streamlit:\n", |
348 | 342 | " # see: https://discuss.streamlit.io/t/how-to-launch-streamlit-app-from-google-colab-notebook/42399\n", |
349 | 343 | " 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", |
350 | 345 | " !streamlit run streamlit_report/sections/report_manager.py --server.address=localhost &>/content/logs.txt &\n", |
| 346 | + " # Expose the Streamlit app on port 8501\n", |
351 | 347 | " !npx localtunnel --port 8501 --subdomain vuegen-demo\n", |
352 | 348 | "else:\n", |
353 | 349 | " print(\"Streamlit report not executed, set run_streamlit to True to run the report\")" |
|
0 commit comments