ejschwartz commited on
Commit
347742a
·
1 Parent(s): 9a4b368

Revert "Try to disable the first_token thing"

Browse files

This reverts commit 5708410443a1396d7f0d660fd644999ad857a0ce.

Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -48,9 +48,8 @@ def field_prompt(code):
48
  print(f"fields: {fields}")
49
 
50
  prompt = f"```\n{code}\n```\nWhat are the variable name and type for the following memory accesses:{', '.join(fields)}?\n"
51
-
52
- #if len(fields) > 0:
53
- # prompt += f"{fields[0]}:"
54
 
55
  print(f"field prompt: {repr(prompt)}")
56
 
@@ -124,7 +123,7 @@ def infer(code):
124
  clean_up_tokenization_spaces=True,
125
  )
126
 
127
- #field_output = fields[0] + ":" + field_output
128
  var_output = first_var + ":" + var_output
129
  fieldstring = ", ".join(fields)
130
  return var_output, field_output, varstring, fieldstring
 
48
  print(f"fields: {fields}")
49
 
50
  prompt = f"```\n{code}\n```\nWhat are the variable name and type for the following memory accesses:{', '.join(fields)}?\n"
51
+ if len(fields) > 0:
52
+ prompt += f"{fields[0]}:"
 
53
 
54
  print(f"field prompt: {repr(prompt)}")
55
 
 
123
  clean_up_tokenization_spaces=True,
124
  )
125
 
126
+ field_output = fields[0] + ":" + field_output
127
  var_output = first_var + ":" + var_output
128
  fieldstring = ", ".join(fields)
129
  return var_output, field_output, varstring, fieldstring