Ajustements interface pour accepter PNG et éviter timeouts

This commit is contained in:
François Pelletier 2024-11-24 21:40:53 -05:00
parent a0e2067f2b
commit 7a9ef6d974
2 changed files with 2 additions and 2 deletions

View file

@ -80,7 +80,8 @@ def app_tab3():
# Send the POST request with the JSON data in the request body
response = requests.post(f"{st.session_state['fabriquedoc_endpoint']}/generer/",
json=document_specs.model_dump(),
headers=post_headers)
headers=post_headers,
timeout=(30, 3000)) # 30 seconds connect timeout, 5 minutes read timeout
# Check the response status code
if 200 <= response.status_code <= 299:
# If the request is successful, get the file data from the response

View file

@ -17,7 +17,6 @@ def app_tab4():
st.write("Envoyer une image")
uploaded_files = st.file_uploader("Choisis un fichier image",
type=["jpg", "jpeg"],
accept_multiple_files=True)
if uploaded_files is not None:
for uploaded_file in uploaded_files: