chris1nexus commited on
Commit
1e6b325
·
1 Parent(s): 5ddda08

Update prompt

Browse files
src/__pycache__/adapter.cpython-310.pyc ADDED
Binary file (13 kB). View file
 
src/__pycache__/config.cpython-310.pyc ADDED
Binary file (2.08 kB). View file
 
src/__pycache__/utils.cpython-310.pyc ADDED
Binary file (3.44 kB). View file
 
src/streamlit_app.py CHANGED
@@ -426,8 +426,8 @@ if st.session_state.challenge_images_original:
426
 
427
  for image_b64 in challenge_images_b64:
428
  result = adapter.generate(prompt=prompt, image=image_b64)
429
- outcome = output_parse_fn(result)
430
- raw_preds.append(outcome)
431
  preds.append(outcome)
432
 
433
  selected_ids = [i+1 for i, outcome in enumerate(preds) if outcome]
 
426
 
427
  for image_b64 in challenge_images_b64:
428
  result = adapter.generate(prompt=prompt, image=image_b64)
429
+ outcome = output_parse_fn(result, st.session_state.challenge_target)
430
+ raw_preds.append(result)
431
  preds.append(outcome)
432
 
433
  selected_ids = [i+1 for i, outcome in enumerate(preds) if outcome]
src/utils.py CHANGED
@@ -66,7 +66,7 @@ def parse_prompt1_indices(text: str) -> List[int]:
66
  return sorted(set(int(n) for n in nums))
67
 
68
 
69
- def parse_prompt_1(text: str) -> bool:
70
  t = normalize_label(text)
71
  if t in {"yes", "y"}: return True
72
  if t in {"no", "n"}: return False
 
66
  return sorted(set(int(n) for n in nums))
67
 
68
 
69
+ def parse_prompt_1(text: str, target:Optional[str]) -> bool:
70
  t = normalize_label(text)
71
  if t in {"yes", "y"}: return True
72
  if t in {"no", "n"}: return False