Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,14 +14,14 @@ from pyngrok import conf, ngrok
|
|
| 14 |
import requests
|
| 15 |
|
| 16 |
# Manually set ngrok path
|
| 17 |
-
ngrok_path = "/Users/ninadmandavkar/Desktop/ngrok/ngrok 3"
|
| 18 |
|
| 19 |
# Set the ngrok path in the configuration
|
| 20 |
-
config = conf.get_default()
|
| 21 |
-
config.ngrok_path = ngrok_path
|
| 22 |
|
| 23 |
# Set your ngrok auth token
|
| 24 |
-
ngrok.set_auth_token('2jQ6LRMBFqe25TP7o2ugti9EH6Y_3mBzBYbsjZmhh69eGq2Q1')
|
| 25 |
|
| 26 |
# logging.basicConfig(level=logging.INFO)
|
| 27 |
|
|
@@ -1562,8 +1562,8 @@ st.write(" ")
|
|
| 1562 |
# Start a tunnel to the correct port
|
| 1563 |
|
| 1564 |
# Connect to a port (e.g., 8501) without a custom subdomain
|
| 1565 |
-
try:
|
| 1566 |
-
|
| 1567 |
-
|
| 1568 |
-
except Exception as e:
|
| 1569 |
-
|
|
|
|
| 14 |
import requests
|
| 15 |
|
| 16 |
# Manually set ngrok path
|
| 17 |
+
# ngrok_path = "/Users/ninadmandavkar/Desktop/ngrok/ngrok 3"
|
| 18 |
|
| 19 |
# Set the ngrok path in the configuration
|
| 20 |
+
# config = conf.get_default()
|
| 21 |
+
# config.ngrok_path = ngrok_path
|
| 22 |
|
| 23 |
# Set your ngrok auth token
|
| 24 |
+
# ngrok.set_auth_token('2jQ6LRMBFqe25TP7o2ugti9EH6Y_3mBzBYbsjZmhh69eGq2Q1')
|
| 25 |
|
| 26 |
# logging.basicConfig(level=logging.INFO)
|
| 27 |
|
|
|
|
| 1562 |
# Start a tunnel to the correct port
|
| 1563 |
|
| 1564 |
# Connect to a port (e.g., 8501) without a custom subdomain
|
| 1565 |
+
# try:
|
| 1566 |
+
# ngrok_tunnel = ngrok.connect(8501) # Replace 8501 with your port number
|
| 1567 |
+
# print(f"ngrok tunnel URL: {ngrok_tunnel.public_url}")
|
| 1568 |
+
# except Exception as e:
|
| 1569 |
+
# print(f"Failed to start ngrok tunnel: {e}")
|