Update main.py
Browse files
main.py
CHANGED
@@ -27,7 +27,7 @@ import os
|
|
27 |
import utils
|
28 |
import shutil
|
29 |
import nest_asyncio
|
30 |
-
from pyngrok import ngrok
|
31 |
|
32 |
## APPLICATION LIFESPAN
|
33 |
# Load the environment variables using FastAPI lifespan event so that they are available throughout the application
|
@@ -372,7 +372,8 @@ async def get_answer_with_chat_history(llm: str, question: Question):
|
|
372 |
return response
|
373 |
|
374 |
# Set ngrok binary path
|
375 |
-
ngrok.set_ngrok_path(os.path.expanduser("~/.ngrok2/ngrok"))
|
|
|
376 |
|
377 |
# Set ngrok authentication token
|
378 |
ngrok.set_auth_token(os.environ['NGROK_AUTHTOKEN'])
|
|
|
27 |
import utils
|
28 |
import shutil
|
29 |
import nest_asyncio
|
30 |
+
from pyngrok import conf, ngrok
|
31 |
|
32 |
## APPLICATION LIFESPAN
|
33 |
# Load the environment variables using FastAPI lifespan event so that they are available throughout the application
|
|
|
372 |
return response
|
373 |
|
374 |
# Set ngrok binary path
|
375 |
+
# ngrok.set_ngrok_path(os.path.expanduser("~/.ngrok2/ngrok"))
|
376 |
+
conf.get_default().ngrok_path = "/usr/local/bin/ngrok"
|
377 |
|
378 |
# Set ngrok authentication token
|
379 |
ngrok.set_auth_token(os.environ['NGROK_AUTHTOKEN'])
|