changer URL backend

This commit is contained in:
francois 2023-05-08 15:28:29 +00:00
parent e3f171afe4
commit 5a37eea9f3

View file

@ -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)