Shawn732 commited on
Commit
a4afd07
·
1 Parent(s): f142339
Files changed (2) hide show
  1. main.py +7 -7
  2. start_server.sh +4 -4
main.py CHANGED
@@ -217,15 +217,15 @@ setup_chain()
217
 
218
  if __name__ == "__main__":
219
 
220
- if NGROK_TOKEN is not None:
221
- ngrok.set_auth_token(NGROK_TOKEN)
222
 
223
- ngrok_tunnel = ngrok.connect(8000)
224
- public_url = ngrok_tunnel.public_url
225
 
226
- print('Public URL:', public_url)
227
- print("You can use {}/predict to get the assistant result.".format(public_url))
228
- logger.info("You can use {}/predict to get the assistant result.".format(public_url))
229
 
230
  nest_asyncio.apply()
231
  uvicorn.run(app, port=8000)
 
217
 
218
  if __name__ == "__main__":
219
 
220
+ # if NGROK_TOKEN is not None:
221
+ # ngrok.set_auth_token(NGROK_TOKEN)
222
 
223
+ # ngrok_tunnel = ngrok.connect(8000)
224
+ # public_url = ngrok_tunnel.public_url
225
 
226
+ # print('Public URL:', public_url)
227
+ # print("You can use {}/predict to get the assistant result.".format(public_url))
228
+ # logger.info("You can use {}/predict to get the assistant result.".format(public_url))
229
 
230
  nest_asyncio.apply()
231
  uvicorn.run(app, port=8000)
start_server.sh CHANGED
@@ -8,15 +8,15 @@ python3 main.py &
8
  FASTAPI_PID=$!
9
 
10
  # Start Streamlit app
11
- echo "Starting Streamlit app..."
12
- streamlit run streamlit_app.py &
13
 
14
  # Store Streamlit process ID
15
- STREAMLIT_PID=$!
16
 
17
  # Wait for any process to exit
18
  wait -n
19
 
20
  # Kill the other process when one exits
21
  kill -TERM $FASTAPI_PID
22
- kill -TERM $STREAMLIT_PID
 
8
  FASTAPI_PID=$!
9
 
10
  # Start Streamlit app
11
+ #echo "Starting Streamlit app..."
12
+ #streamlit run streamlit_app.py &
13
 
14
  # Store Streamlit process ID
15
+ #STREAMLIT_PID=$!
16
 
17
  # Wait for any process to exit
18
  wait -n
19
 
20
  # Kill the other process when one exits
21
  kill -TERM $FASTAPI_PID
22
+ #kill -TERM $STREAMLIT_PID