From 5a37eea9f3a7025b9839c8a7ae34d1494ee6b28f Mon Sep 17 00:00:00 2001 From: francois Date: Mon, 8 May 2023 15:28:29 +0000 Subject: [PATCH] changer URL backend --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)