diff --git a/machine-learning-client/machine_learning_client.py b/machine-learning-client/machine_learning_client.py index 2056731..c432094 100644 --- a/machine-learning-client/machine_learning_client.py +++ b/machine-learning-client/machine_learning_client.py @@ -20,7 +20,7 @@ ## python3 machine_learning_client.py client = MongoClient("mongodb://mongodb:27017/") -db = client["ml_databse"] +db = client["ml_database"] collection = db["transcription"] diff --git a/web-app/app.py b/web-app/app.py index b030d08..4dce5cb 100644 --- a/web-app/app.py +++ b/web-app/app.py @@ -10,7 +10,7 @@ app = Flask(__name__, template_folder="templates") # Connect to MongoDB -client = MongoClient("mongodb://localhost:27017/") +client = MongoClient("mongodb://mongodb:27017/") db = client["ml_database"] collection = db["transcription"] @@ -57,7 +57,7 @@ def analyze_data(): return jsonify({"status": "error", "message": "No audio file provided"}) audio_file = request.files["audio"] - ml_client_url = "http://127.0.0.1:5001/analyzeAudio" + ml_client_url = "http://backend:5001/analyzeAudio" # Use the converted audio file response = requests.post( ml_client_url, files={"audio": audio_file}, timeout=100