eliphatfs commited on
Commit
e628f3f
1 Parent(s): c1a343f

Updated texts.

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -93,10 +93,10 @@ def queue_auto_submit(key):
93
  img_example_counter = 0
94
 
95
 
96
- def image_examples(samples, ncols, return_key=None):
97
  global img_example_counter
98
  trigger = False
99
- with st.expander("Examples", True):
100
  for i in range(len(samples) // ncols):
101
  cols = st.columns(ncols)
102
  for j in range(ncols):
@@ -154,7 +154,7 @@ def demo_classification():
154
  st.text(cat)
155
  st.caption("Similarity %.4f" % sim)
156
  prog.progress(1.0, "Idle")
157
- if image_examples(samples_index.classification, 3):
158
  queue_auto_submit("clsauto")
159
 
160
 
@@ -169,7 +169,7 @@ def demo_captioning():
169
  cap = caption.pc_caption(model_b32, pc, cond_scale)
170
  st.text(cap)
171
  prog.progress(1.0, "Idle")
172
- if image_examples(samples_index.cap, 3):
173
  queue_auto_submit("capauto")
174
 
175
 
@@ -202,6 +202,7 @@ def demo_pc2img():
202
 
203
 
204
  def retrieval_results(results):
 
205
  for i in range(len(results) // 4):
206
  cols = st.columns(4)
207
  for j in range(4):
 
93
  img_example_counter = 0
94
 
95
 
96
+ def image_examples(samples, ncols, return_key=None, example_text="Examples"):
97
  global img_example_counter
98
  trigger = False
99
+ with st.expander(example_text, True):
100
  for i in range(len(samples) // ncols):
101
  cols = st.columns(ncols)
102
  for j in range(ncols):
 
154
  st.text(cat)
155
  st.caption("Similarity %.4f" % sim)
156
  prog.progress(1.0, "Idle")
157
+ if image_examples(samples_index.classification, 3, example_text="Examples (Choose one of the following 3D shapes)"):
158
  queue_auto_submit("clsauto")
159
 
160
 
 
169
  cap = caption.pc_caption(model_b32, pc, cond_scale)
170
  st.text(cap)
171
  prog.progress(1.0, "Idle")
172
+ if image_examples(samples_index.cap, 3, example_text="Examples (Choose one of the following 3D shapes)"):
173
  queue_auto_submit("capauto")
174
 
175
 
 
202
 
203
 
204
  def retrieval_results(results):
205
+ st.caption("Click the link to view the 3D shape")
206
  for i in range(len(results) // 4):
207
  cols = st.columns(4)
208
  for j in range(4):