Spaces:
Runtime error
Runtime error
Update app/main.py
Browse files- app/main.py +0 -11
app/main.py
CHANGED
|
@@ -9,7 +9,6 @@ from twilio.twiml.messaging_response import MessagingResponse
|
|
| 9 |
from langchain_openai import OpenAIEmbeddings
|
| 10 |
from langchain_community.vectorstores import Chroma
|
| 11 |
from helper import retrieve_relevant_context, generate_response_with_context
|
| 12 |
-
from pyngrok import ngrok
|
| 13 |
|
| 14 |
# Setting up paths
|
| 15 |
file = Path(__file__).resolve()
|
|
@@ -99,14 +98,4 @@ def incoming_sms():
|
|
| 99 |
return str(resp)
|
| 100 |
|
| 101 |
if __name__ == "__main__":
|
| 102 |
-
# Set NGROK_HOME to a writable directory
|
| 103 |
-
os.environ["NGROK_HOME"] = str(parent / 'ngrok')
|
| 104 |
-
|
| 105 |
-
# Start ngrok tunnel
|
| 106 |
-
ngrok_tunnel = ngrok.connect(5000)
|
| 107 |
-
print(f"ngrok tunnel 'http' URL: {ngrok_tunnel.public_url}")
|
| 108 |
-
|
| 109 |
-
# Print the ngrok URL so you can set it in Twilio webhook
|
| 110 |
-
print("ngrok URL:", ngrok_tunnel.public_url + "/whatsapp")
|
| 111 |
-
|
| 112 |
app.run(host='0.0.0.0', port=5000, debug=True)
|
|
|
|
| 9 |
from langchain_openai import OpenAIEmbeddings
|
| 10 |
from langchain_community.vectorstores import Chroma
|
| 11 |
from helper import retrieve_relevant_context, generate_response_with_context
|
|
|
|
| 12 |
|
| 13 |
# Setting up paths
|
| 14 |
file = Path(__file__).resolve()
|
|
|
|
| 98 |
return str(resp)
|
| 99 |
|
| 100 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
app.run(host='0.0.0.0', port=5000, debug=True)
|