This commit is contained in:
markrz12 2024-01-16 16:24:47 +01:00
parent b4bd59ad09
commit 8e7ac6af76

View File

@ -39,7 +39,6 @@ class State(rx.State):
self.toggle_show() self.toggle_show()
return return
for file in files: for file in files:
upload_data = await file.read() upload_data = await file.read()
outfile = rx.get_asset_path(file.filename) outfile = rx.get_asset_path(file.filename)
@ -71,7 +70,7 @@ class State(rx.State):
async def image_analysis(self, img_name: str): async def image_analysis(self, img_name: str):
if img_name in self.img: if img_name in self.img:
stripped_image_name = str(img_name).lstrip("analysis-").lstrip("anonim-") stripped_image_name = str(img_name).replace("analysis-", "").replace("anonim-", "")
image_path = rx.get_asset_path(stripped_image_name) image_path = rx.get_asset_path(stripped_image_name)
#timestamp = datetime.now().strftime("%Y%m%d%H%M%S%f") #timestamp = datetime.now().strftime("%Y%m%d%H%M%S%f")
new_image_name = f"analysis-{stripped_image_name}" new_image_name = f"analysis-{stripped_image_name}"