Belligerent commited on
Commit
583a612
·
1 Parent(s): 25a3fef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,8 +8,8 @@ model = AutoModelForSeq2SeqLM.from_pretrained("jpelhaw/t5-word-sense-disambiguat
8
  input = 'question: which description describes the word " java " best in the following context? descriptions:[ " A drink consisting of an infusion of ground coffee beans "," a platform-independent programming language ", or " an island in Indonesia to the south of Borneo " ] context: I like to drink " java " in the morning .'
9
 
10
  example = tokenizer.tokenize(input, add_special_tokens=True)
11
- print(example[0:20])
12
 
13
- answer = model.generate(input_ids=example['input_ids'],
14
- attention_mask=example['attention_mask'],
15
  max_length=135)
 
8
  input = 'question: which description describes the word " java " best in the following context? descriptions:[ " A drink consisting of an infusion of ground coffee beans "," a platform-independent programming language ", or " an island in Indonesia to the south of Borneo " ] context: I like to drink " java " in the morning .'
9
 
10
  example = tokenizer.tokenize(input, add_special_tokens=True)
11
+ print(example[0:40])
12
 
13
+ answer = model.generate(input_ids=example[0:40],
14
+ attention_mask=example[9],
15
  max_length=135)