ejschwartz commited on
Commit
5708410
·
1 Parent(s): 2456748

Try to disable the first_token thing

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -48,8 +48,9 @@ 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
- if len(fields) > 0:
52
- prompt += f"{fields[0]}:"
 
53
 
54
  print(f"field prompt: {repr(prompt)}")
55
 
@@ -123,7 +124,7 @@ def infer(code):
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
 
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
  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