diff --git a/assets/background.png b/assets/background.png deleted file mode 100644 index af41669..0000000 Binary files a/assets/background.png and /dev/null differ diff --git a/assets/cooperation.png b/assets/cooperation.png new file mode 100644 index 0000000..6109bb4 Binary files /dev/null and b/assets/cooperation.png differ diff --git a/assets/data-analysis.png b/assets/data-analysis.png new file mode 100644 index 0000000..eb20388 Binary files /dev/null and b/assets/data-analysis.png differ diff --git a/assets/flower.png b/assets/flower.png deleted file mode 100644 index b383735..0000000 Binary files a/assets/flower.png and /dev/null differ diff --git a/assets/innovation.png b/assets/innovation.png new file mode 100644 index 0000000..4724e3b Binary files /dev/null and b/assets/innovation.png differ diff --git a/assets/obraz1.png b/assets/obraz1.png index be1f149..774d009 100644 Binary files a/assets/obraz1.png and b/assets/obraz1.png differ diff --git a/blurme/pages/about.py b/blurme/pages/about.py index de4a03a..f09f6ab 100644 --- a/blurme/pages/about.py +++ b/blurme/pages/about.py @@ -46,22 +46,18 @@ def about() -> rx.Component: rx.box( rx.text("Jesteśmy grupą studentek kierunku Przetwarzania i Analizy Danych, które postanowiły połączyć swoje różnorodne umiejętności w ramach wspólnego projektu. Zależy nam nie tylko na zdobywaniu wiedzy na uczelni, ale także na praktycznym wykorzystaniu naszych umiejętności w realnych projektach.", margin_right="5%", margin_left="5%", margin_bottom = "10px"), - rx.list(rx.hstack( - rx.list_item(rx.text("Współpraca",as_="b",font_size="1.3em"), + rx.wrap(rx.hstack( + rx.vstack(rx.image(src= "/cooperation.png", height = "8em", align = "center"), + rx.text("Współpraca",as_="b",font_size="1.3em"), rx.text("W naszym zespole każda z nas wnosi unikalne perspektywy i pomysły, co sprawia, że nasza współpraca jest inspirująca.", text_align="center"),), - rx.list_item(rx.text("Innowacyjność",as_="b",font_size="1.3em"), + rx.vstack(rx.image(src= "/innovation.png", height = "8em", align = "center"), + rx.text("Innowacyjność",as_="b",font_size="1.3em"), rx.text("Naszym głównym celem jest stworzenie innowacyjnego rozwiązania, które nie tylko będzie spełniać potrzeby dzisiejszych czasów, ale również przyczyni się do ochrony prywatności w kontekście współdzielenia zdjęć online.", text_align="center"),), - rx.list_item(rx.text("Analiza danych", as_="b",font_size="1.3em"), + rx.vstack(rx.image(src= "/data-analysis.png", height = "8em", align = "center"), + rx.text("Analiza danych", as_="b",font_size="1.3em"), rx.text("Nasza pasja do analizy i zrozumienia dziedziny przetwarzania danych stanowią fundamenty naszego projektu.", text_align="center"),), style={"align-self": "center", "align-items": "flex-start"}),style={"align-self": "center", "align-items": "flex-start"}, margin_right = "5%", margin_left = "5%"), - - #rx.list( - # rx.list_item( rx.icon(tag="arrow_forward")," W naszym zespole każda z nas wnosi unikalne perspektywy i pomysły, co sprawia, że nasza współpraca jest inspirująca.",), - # rx.list_item(rx.icon(tag="arrow_forward"), " Nasza pasja do analizy danych oraz zrozumienie dziedziny przetwarzania danych stanowią fundamenty naszego projektu."), - # rx.list_item( rx.icon(tag="arrow_forward")," Naszym głównym celem jest stworzenie innowacyjnego rozwiązania, które nie tylko będzie spełniać potrzeby dzisiejszych czasów, ale również przyczyni się do ochrony prywatności w kontekście współdzielenia zdjęć online.",), - # margin_left = "18%", margin_right = "18%"), - rx.text("Dzięki zaufaniu naszych użytkowników oraz naszemu zangażowaniu, wierzymy, że nasz projekt przyczyni się do tworzenia bezpieczniejszej przestrzeni dla współdzielenia zdjęć w sieci. Cieszymy się, że możemy być częścią tej fascynującej podróży!", margin_right="5%", margin_left="5%", margin_top="10px"), text_align = "center",), rx.list( rx.list_item(rx.text("Nasza Misja",padding = "10px", text_align="center",background_image="linear-gradient( 64.5deg, rgba(245,116,185,1) 14.7%, rgba(89,97,223,1) 88.7% )", background_clip="text", font_size="2em", font_weight="bold", margin_top="30px", margin_bottom="5px"), diff --git a/blurme/pages/dashboard.py b/blurme/pages/dashboard.py index 97a16ce..08a2689 100644 --- a/blurme/pages/dashboard.py +++ b/blurme/pages/dashboard.py @@ -43,15 +43,18 @@ def dashboard() -> rx.Component: icon_style = {"width": "20px", "height": "30px", "margin-right": "10px"} heading_style = {"font-weight": "bold", "font-family": "Arial, sans-serif"} - return rx.fragment( - rx.heading("Kontakt", font_size="3em", margin_bottom="10px", background_image="linear-gradient( 64.5deg, rgba(245,116,185,1) 14.7%, rgba(89,97,223,1) 88.7% )", background_clip="text", padding = "10px", text_align = "center"), - rx.text("Witaj na stronie Kontaktowej w aplikacji BlurMe!", text_align = "center", margin_right = "15%", margin_left="15%"), - rx.text( - "Jesteśmy dostępni dla Ciebie na różnych platformach. " + + return rx.wrap( + rx.hstack( + rx.vstack(rx.hstack(rx.image(src="/sparkle-left.png",height="3em"), + rx.heading("Skontaktuj się!", font_size="2.6em", margin_bottom="10px", background_image="linear-gradient( 64.5deg, rgba(245,116,185,1) 14.7%, rgba(89,97,223,1) 88.7% )", background_clip="text", padding = "5px", text_align = "center"), + rx.image(src="/sparkle-right.png",height="3em"), style={"align-self": "center"}), + rx.text("Witaj na stronie Kontaktowej w aplikacji BlurMe!", font_size="1.2em", text_align = "center"), + rx.text("Jesteśmy dostępni dla Ciebie na różnych platformach. " "Skontaktuj się z nami, gdy tylko masz pytania, sugestie lub " - "po prostu chcesz porozmawiać o naszej aplikacji.", text_align = "center", margin_right = "15%", margin_left="15%" - ), - rx.wrap(rx.hstack(rx.vstack(rx.fragment( + "po prostu chcesz porozmawiać o naszej aplikacji.", margin_bottom="25px", text_align = "center"), + style={"align-self": "flex-start","margin-left": "50px", "margin-top": "50px", "align-self": "flex-start", "margin-bottom": "25px"}, width = "50%"), + rx.wrap(rx.vstack(rx.vstack(rx.fragment( rx.hstack(rx.icon(tag="email",style=icon_style), rx.heading("E-mail", level=3, style=heading_style), margin_top="20px"), rx.text("Zapraszamy do napisania do nas na adres: contact@blurme.com"), @@ -60,4 +63,7 @@ def dashboard() -> rx.Component: rx.hstack(rx.icon(tag="phone", style=icon_style),rx.heading("Telefon", level=3, style=heading_style), margin_top="20px"), rx.text("Możesz także zadzwonić pod numer: +48 123 456 789"), style=container_style, text_align = "center"),), - ),style={"align-self": "flex-center"}),) + ),style={"align-self": "flex-center"}),)) + + + diff --git a/blurme/pages/index.py b/blurme/pages/index.py index c053d89..07ed3a3 100644 --- a/blurme/pages/index.py +++ b/blurme/pages/index.py @@ -19,7 +19,7 @@ def index() -> rx.Component: rx.text("", pading = "25px"), rx.link(rx.button("Zacznij anonimizować"), href="settings",align="center",color="rgba(117,102,254,255)",button=True,padding="50xp",font_size="1.2em"), style={"align-self": "flex-start","margin-left": "50px", "margin-top": "50px", "align-self": "flex-start", "margin-bottom": "25px"}, width = "50%"), - rx.image(src="obraz1.png",height="25em",padding="0.5em",style={"margin-right": "60px"}), + rx.image(src="obraz1.png",height="28em",padding="0.5em",style={"margin-right": "60px"}), style={"align-self": "flex-start"}),), rx.text(" ", height = "20px"), diff --git a/blurme/state.py b/blurme/state.py index 3ee0199..65b329b 100644 --- a/blurme/state.py +++ b/blurme/state.py @@ -4,7 +4,7 @@ import reflex as rx import os from blurme import styles import asyncio -from datetime import datetime + from graphics.image_modification import blur_boxes_on_image from graphics.image_modification import show_image_with_boxes from ml.element_detection import BoundBox, detect @@ -27,6 +27,11 @@ class State(rx.State): Args: files: The uploaded files. """ + max_files_limit = 5 + if len(self.img) + len(files) > max_files_limit: + print("You can't upload more than {} files.".format(max_files_limit)) + return + for file in files: #if len(self.img) >= 5: @@ -40,6 +45,7 @@ class State(rx.State): # Update the img var. self.img.append(file.filename) self.img = self.img + def delete_image(self, img_name: str): if img_name in self.img: self.img.remove(img_name) @@ -63,18 +69,20 @@ class State(rx.State): async def image_anonymization(self, img_name: str): if img_name in self.img: - stripped_image_name = str(img_name).lstrip("analysis-").lstrip("anonim-") - image_path = rx.get_asset_path(stripped_image_name) - #timestamp = datetime.now().strftime("%Y%m%d%H%M%S%f") - new_image_name = f"anonim-{stripped_image_name}" - new_image_path = rx.get_asset_path(new_image_name) + image_path = rx.get_asset_path(img_name) + new_img_name = "anonim-" + img_name + new_image_path = rx.get_asset_path(new_img_name) blur_boxes_on_image(image_path, detect(image_path), new_image_path) - upload_file = rx.UploadFile(file=open(new_image_path, 'rb'), filename=new_image_name) + upload_file = rx.UploadFile(file=open(new_image_path, 'rb'), filename=new_img_name) self.delete_image(img_name) await self.handle_upload([upload_file]) self.img=self.img + + + + #async def toggle_dark_mode(self): # self.dark_mode = not self.dark_mode # print(f"Dark Mode State: {self.dark_mode}")