diff --git a/app_tab3.py b/app_tab3.py index 59fcfa5..8f2f013 100644 --- a/app_tab3.py +++ b/app_tab3.py @@ -48,17 +48,13 @@ def app_tab3(): vmargin = st.number_input("Vertical margin:", value=int(response_format_parameters.get("vmargin")), step=10) - extension = st.selectbox("Extension:", ["jpg", "pdf", "mp4"]) - if extension == "mp4": - fps = st.number_input("FPS:", - value=int(response_format_parameters.get("fps")), - step=1) - stilltime = st.number_input("Still time:", - value=int(response_format_parameters.get("stilltime")), - step=1) - else: - fps = 0 - stilltime = 0 + extension = "mp4" + fps = st.number_input("FPS:", + value=int(response_format_parameters.get("fps")), + step=1) + stilltime = st.number_input("Still time:", + value=int(response_format_parameters.get("stilltime")), + step=1) # Envoi if st.button("Generate post"): @@ -91,14 +87,9 @@ def app_tab3(): file_data = response.content datef = datetime.datetime.now().strftime("%m-%d-%Y") - if document_specs.extension in ["jpg"]: - extn = "zip" - else: - extn = document_specs.extension - - file_name = f"{document_specs.style}-{document_specs.format}-{datef}-output.{extn}" + file_name = f"{document_specs.style}-{document_specs.format}-{datef}-output.zip" st.download_button('Télécharger', file_data, file_name=file_name) else: # If the request is unsuccessful, display the error status code and message - st.error(f"Request failed with status code {response.status_code}: {response.text}") + st.error(f"Request failed with status code {response.status_code}: {response.text}") \ No newline at end of file