Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
# Install necessary libraries
|
2 |
!pip install streamlit
|
3 |
!pip install plotly
|
|
|
|
|
|
|
|
|
4 |
|
5 |
# Create the app.py file for Streamlit
|
6 |
app_code = """
|
@@ -95,4 +99,12 @@ with open("app.py", "w") as file:
|
|
95 |
file.write(app_code)
|
96 |
|
97 |
# Run Streamlit app in Colab using subprocess
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Install necessary libraries
|
2 |
!pip install streamlit
|
3 |
!pip install plotly
|
4 |
+
!pip install pyngrok
|
5 |
+
|
6 |
+
# Authenticate ngrok (replace YOUR_ACTUAL_AUTH_TOKEN with your actual token)
|
7 |
+
!2qQbK3clYiQev19XvITBDlPLKxx_2Q7PxKApVrYZhVKUBY1my # Replace with your ngrok token
|
8 |
|
9 |
# Create the app.py file for Streamlit
|
10 |
app_code = """
|
|
|
99 |
file.write(app_code)
|
100 |
|
101 |
# Run Streamlit app in Colab using subprocess
|
102 |
+
import os
|
103 |
+
os.system('streamlit run app.py &')
|
104 |
+
|
105 |
+
# Set up the ngrok tunnel
|
106 |
+
from pyngrok import ngrok
|
107 |
+
public_url = ngrok.connect(port='8501')
|
108 |
+
|
109 |
+
# Display the public URL
|
110 |
+
public_url
|