Belligerent commited on
Commit
1b28900
·
1 Parent(s): 7cae5e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -3,9 +3,12 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, Text2TextGenerati
3
 
4
  pipe = Text2TextGenerationPipeline(model = AutoModelForSeq2SeqLM.from_pretrained("jpelhaw/t5-word-sense-disambiguation"),tokenizer = AutoTokenizer.from_pretrained("jpelhaw/t5-word-sense-disambiguation"), )
5
 
 
 
 
6
  gr.Interface.from_pipeline(pipe,
7
  inputs = "textbox",
8
  outputs="textbox",
9
- examples = '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 lanugage " , or " an island in Indonesia to the south of Borneo " ] context: I like to drink "java" in the morning .',
10
  title = "word sense disambiguation",
11
  allow_flagging="never").launch(inbrowser=True)
 
3
 
4
  pipe = Text2TextGenerationPipeline(model = AutoModelForSeq2SeqLM.from_pretrained("jpelhaw/t5-word-sense-disambiguation"),tokenizer = AutoTokenizer.from_pretrained("jpelhaw/t5-word-sense-disambiguation"), )
5
 
6
+
7
+ examples = ["""'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 lanugage " , or " an island in Indonesia to the south of Borneo " ] context: I like to drink "java" in the morning ."""]
8
+
9
  gr.Interface.from_pipeline(pipe,
10
  inputs = "textbox",
11
  outputs="textbox",
12
+ examples = examples,
13
  title = "word sense disambiguation",
14
  allow_flagging="never").launch(inbrowser=True)