File size: 3,420 Bytes
e58b6a6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# MoneyPrinterTurbo Setup Guide\n",
"\n",
"This notebook will guide you through the process of setting up [MoneyPrinterTurbo](https://github.com/harry0703/MoneyPrinterTurbo)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1. Clone Repository and Install Dependencies\n",
"\n",
"First, we'll clone the repository from GitHub and install all required packages:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "S8Eu-aQarY_B"
},
"outputs": [],
"source": [
"!git clone https://github.com/harry0703/MoneyPrinterTurbo.git\n",
"%cd MoneyPrinterTurbo\n",
"!pip install -q -r requirements.txt\n",
"!pip install pyngrok --quiet"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2. Configure ngrok for Remote Access\n",
"\n",
"We'll use ngrok to create a secure tunnel to expose our local Streamlit server to the internet.\n",
"\n",
"**Important**: You need to get your authentication token from the [ngrok dashboard](https://dashboard.ngrok.com/get-started/your-authtoken) to use this service."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from pyngrok import ngrok\n",
"\n",
"# Terminate any existing ngrok tunnels\n",
"ngrok.kill()\n",
"\n",
"# Set your authentication token\n",
"# Replace \"your_ngrok_auth_token\" with your actual token\n",
"ngrok.set_auth_token(\"your_ngrok_auth_token\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3. Launch Application and Generate Public URL\n",
"\n",
"Now we'll start the Streamlit server and create an ngrok tunnel to make it accessible online:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"collapsed": true,
"id": "oahsIOXmwjl9",
"outputId": "ee23a96c-af21-4207-deb7-9fab69e0c05e"
},
"outputs": [],
"source": [
"import subprocess\n",
"import time\n",
"\n",
"print(\"π Starting MoneyPrinterTurbo...\")\n",
"# Start Streamlit server on port 8501\n",
"streamlit_proc = subprocess.Popen([\n",
" \"streamlit\", \"run\", \"./webui/Main.py\", \"--server.port=8501\"\n",
"])\n",
"\n",
"# Wait for the server to initialize\n",
"time.sleep(5)\n",
"\n",
"print(\"π Creating ngrok tunnel to expose the MoneyPrinterTurbo...\")\n",
"public_url = ngrok.connect(8501, bind_tls=True)\n",
"\n",
"print(\"β
Deployment complete! Access your MoneyPrinterTurbo at:\")\n",
"print(public_url)"
]
}
],
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|