From b8f6bf316b4acecaa61e9f8c6e3f26e59039a5cc Mon Sep 17 00:00:00 2001 From: Siddhant Mohile <60550481+SidmoGoesBrrr@users.noreply.github.com> Date: Sat, 11 May 2024 11:26:55 +0530 Subject: [PATCH] Fixed run_ui.py Fixed the error that pops up when we only upload an image and click generate. --- run_ui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/run_ui.py b/run_ui.py index ec39cd4..3764d4c 100644 --- a/run_ui.py +++ b/run_ui.py @@ -27,6 +27,9 @@ if meme_image is None: st.error("Please upload an image!") st.stop() + if news_article.strip() = "" or "." not in news_article: + st.error("Please enter a valid news article!") + st.stop() bytes_data = meme_image.getvalue() with st.status("Starting...", state="running") as status: image_path = create_upload_file(bytes_data, news_article, status)