diff --git a/main.py b/main.py index ecd5a2c..53d36b8 100644 --- a/main.py +++ b/main.py @@ -16,7 +16,7 @@ import requests import streamlit as st from pydantic import BaseModel -BACKEND_URL = "http://localhost:8000" +backend_url = os.environ.get('BACKEND') class AudioProperties(BaseModel): @@ -106,7 +106,7 @@ def write_app(): bell_sound=bell_sound ) audio_response = requests.get( - BACKEND_URL + "/generate_audio", + backend_url + "/generate_audio", json=ap.dict(), headers={"Content-Type": "application/json"}) st.write(audio_response.reason) @@ -123,7 +123,7 @@ def write_app(): color_scheme=color_scheme ) video_response = requests.get( - BACKEND_URL + "/generate_video", + backend_url + "/generate_video", json=vp.dict(), headers={"Content-Type": "application/json"}) st.write(video_response.reason)