Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
@@ -7,7 +7,7 @@ import streamlit as st
|
|
7 |
from openai import OpenAI
|
8 |
from sshtunnel import SSHTunnelForwarder
|
9 |
|
10 |
-
local_port =
|
11 |
|
12 |
@st.cache_resource()
|
13 |
def load_model():
|
@@ -68,7 +68,7 @@ def start_server():
|
|
68 |
ssh_address_or_host=os.getenv('SERVER_DNS_NAME'),
|
69 |
ssh_username="ec2-user",
|
70 |
ssh_pkey=pkey,
|
71 |
-
local_bind_address=("127.0.0.1",
|
72 |
remote_bind_address=("127.0.0.1", 8000)
|
73 |
)
|
74 |
|
|
|
7 |
from openai import OpenAI
|
8 |
from sshtunnel import SSHTunnelForwarder
|
9 |
|
10 |
+
local_port = int(os.getenv('LOCAL_PORT'))
|
11 |
|
12 |
@st.cache_resource()
|
13 |
def load_model():
|
|
|
68 |
ssh_address_or_host=os.getenv('SERVER_DNS_NAME'),
|
69 |
ssh_username="ec2-user",
|
70 |
ssh_pkey=pkey,
|
71 |
+
local_bind_address=("127.0.0.1", local_port),
|
72 |
remote_bind_address=("127.0.0.1", 8000)
|
73 |
)
|
74 |
|