Anushree2000 commited on
Commit
5bee60a
·
verified ·
1 Parent(s): 2c81220

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -33
app.py CHANGED
@@ -163,7 +163,6 @@ elif page == "Solution Implementation":
163
 
164
 
165
  !pip install streamlit
166
- !pip install pyngrok
167
 
168
 
169
  %%writefile app.py
@@ -177,24 +176,7 @@ st.write("This is a test application running inside Google Colab using ngrok.")
177
  !streamlit run app.py &>/dev/null &
178
 
179
 
180
- !pip install pyngrok
181
- from pyngrok import ngrok
182
 
183
- # Set your authtoken
184
- ngrok.set_auth_token("2uGfZ1H2caVAA1COFKWVy39k5yG_736rTtX96fqtuDL6Ej2e9") # Replace YOUR_AUTHTOKEN with your actual authtoken
185
-
186
- # Kill any running process on port 8501 (optional)
187
- !kill -9 $(lsof -t -i:8501)
188
-
189
- # Start ngrok tunnel
190
- # The port is defined in the addr argument
191
- public_url = ngrok.connect(addr="8501")
192
- print("Access Streamlit at:", public_url)
193
-
194
- !pip install streamlit pyngrok
195
-
196
-
197
- !kill -9 $(lsof -t -i:8501)
198
 
199
 
200
  %%writefile app.py
@@ -322,21 +304,6 @@ elif page == "Goal Tracker":
322
  !streamlit run app.py --server.port 8501 &>/dev/null &
323
 
324
 
325
- from pyngrok import ngrok
326
-
327
- # List all existing ngrok tunnels
328
- tunnels = ngrok.get_tunnels()
329
- # Check if there are any active tunnels before attempting to disconnect
330
- if tunnels:
331
- for tunnel in tunnels:
332
- print("Disconnecting:", tunnel.public_url)
333
- ngrok.disconnect(tunnel.public_url) # Disconnect each active tunnel
334
- else:
335
- print("No active tunnels found.")
336
-
337
- # Start a new tunnel
338
- public_url = ngrok.connect(addr="8501")
339
- print("Access the Streamlit app at:", public_url)
340
 
341
 
342
 
 
163
 
164
 
165
  !pip install streamlit
 
166
 
167
 
168
  %%writefile app.py
 
176
  !streamlit run app.py &>/dev/null &
177
 
178
 
 
 
179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
 
182
  %%writefile app.py
 
304
  !streamlit run app.py --server.port 8501 &>/dev/null &
305
 
306
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
 
308
 
309