research14 commited on
Commit
1885734
·
1 Parent(s): e136236

Fixed error

Browse files
Files changed (1) hide show
  1. run_llm.py +3 -4
run_llm.py CHANGED
@@ -128,7 +128,6 @@ def para(m):
128
  def main(args=None):
129
 
130
  gid_list = selected_idx[args.start:args.end]
131
- text_to_analyze = "Mr. Guber , by contrast , has been married to one woman for more than 20 years ."
132
 
133
 
134
  if 'gpt3' in args.model_path:
@@ -162,7 +161,7 @@ def main(args=None):
162
 
163
  if args.prompt == 1:
164
  for gid in tqdm(gid_list, desc='Query'):
165
- text = text_to_analyze
166
 
167
  for eid, ent in enumerate(ents):
168
  os.makedirs(f'result/prompt1_qa/{args.model_path}/ptb/per_ent/{ent}', exist_ok=True)
@@ -217,7 +216,7 @@ def main(args=None):
217
 
218
  if args.prompt == 2:
219
  for gid in tqdm(gid_list, desc='Query'):
220
- text = text_to_analyze
221
 
222
  ## POS tagging
223
  # if os.path.exists(f'result/prompt2_instruction/pos_tagging/{args.model_path}/ptb/{gid}.txt'):
@@ -302,7 +301,7 @@ def main(args=None):
302
 
303
  if args.prompt == 3:
304
  for gid in tqdm(gid_list, desc='Query'):
305
- text = text_to_analyze
306
  tokens = ptb[gid]['tokens']
307
  poss = ptb[gid]['uni_poss']
308
 
 
128
  def main(args=None):
129
 
130
  gid_list = selected_idx[args.start:args.end]
 
131
 
132
 
133
  if 'gpt3' in args.model_path:
 
161
 
162
  if args.prompt == 1:
163
  for gid in tqdm(gid_list, desc='Query'):
164
+ text = ptb[gid]['text']
165
 
166
  for eid, ent in enumerate(ents):
167
  os.makedirs(f'result/prompt1_qa/{args.model_path}/ptb/per_ent/{ent}', exist_ok=True)
 
216
 
217
  if args.prompt == 2:
218
  for gid in tqdm(gid_list, desc='Query'):
219
+ text = ptb[gid]['text']
220
 
221
  ## POS tagging
222
  # if os.path.exists(f'result/prompt2_instruction/pos_tagging/{args.model_path}/ptb/{gid}.txt'):
 
301
 
302
  if args.prompt == 3:
303
  for gid in tqdm(gid_list, desc='Query'):
304
+ text = ptb[gid]['text']
305
  tokens = ptb[gid]['tokens']
306
  poss = ptb[gid]['uni_poss']
307