userIdc2024 commited on
Commit
5557c8f
·
verified ·
1 Parent(s): 0ca4d13

Update app_pages/text_image_generation.py

Browse files
Files changed (1) hide show
  1. app_pages/text_image_generation.py +5 -0
app_pages/text_image_generation.py CHANGED
@@ -10,6 +10,7 @@ from generator_function.image_function import (
10
  from util.session_state import current_uid
11
 
12
  def render_multimodel_ad_generator(prefix: str = "img_text"):
 
13
  colA, colB = st.columns([1, 1])
14
 
15
  with colA:
@@ -29,6 +30,9 @@ def render_multimodel_ad_generator(prefix: str = "img_text"):
29
  with colB:
30
  prompt = st.text_area("Prompt", placeholder="Describe the image you want to generate...", height=160, key=f"{prefix}_prompt")
31
 
 
 
 
32
  if st.button("Generate Images", type="primary", key=f"{prefix}_go"):
33
  uid = current_uid()
34
  if not uid:
@@ -42,4 +46,5 @@ def render_multimodel_ad_generator(prefix: str = "img_text"):
42
  num_images=num_images,
43
  category=(category.strip() or None),
44
  platform=platform or None,
 
45
  )
 
10
  from util.session_state import current_uid
11
 
12
  def render_multimodel_ad_generator(prefix: str = "img_text"):
13
+ private_mode = st.session_state.get("private_mode_enabled", False)
14
  colA, colB = st.columns([1, 1])
15
 
16
  with colA:
 
30
  with colB:
31
  prompt = st.text_area("Prompt", placeholder="Describe the image you want to generate...", height=160, key=f"{prefix}_prompt")
32
 
33
+ if private_mode:
34
+ st.info("Private mode is on. Generations stay in-session only and will not reach the AI Library or external storage.")
35
+
36
  if st.button("Generate Images", type="primary", key=f"{prefix}_go"):
37
  uid = current_uid()
38
  if not uid:
 
46
  num_images=num_images,
47
  category=(category.strip() or None),
48
  platform=platform or None,
49
+ private_mode=private_mode,
50
  )