Belligerent commited on
Commit
d650a5f
·
1 Parent(s): cf46dda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -11,16 +11,16 @@ def wsd_gen(word, context, d1, d2, d3):
11
  output = pipe(raw_input)[0]['generated_text']
12
  return output
13
 
14
-
15
-
16
  examples = [["beat", 'The underdog team "beat" the reigning champion.', " A main accent or rhythmic unit in music or poetry. " , " To strike repeatedly and violently so as to hurt or injure.", " To defeat (someone) in a game or other competitive situation. "], ["shell", 'The first "shell" exploded in mid air taking out an enemy plane.', "The hard protective outer case of a mollusk or crustacean.", "An explosive artillery projectile or bomb.", "Something resembling or likened to a shell because of its shape or its function as an outer case."]]
17
 
 
 
 
 
 
 
18
  gr.Interface(wsd_gen,
19
- inputs = [gr.inputs.Textbox(lines=1, placeholder= "Enter Word to Mask", default="", label = "Based on the context, which description best matches this word: "),
20
- gr.inputs.Textbox(lines=1, placeholder="Enter context", default="", label = "context: "),
21
- gr.inputs.Textbox(lines=1, placeholder="Enter description", default="", label = "description 1: "),
22
- gr.inputs.Textbox(lines=1, placeholder="Enter description", default="", label = "description 2: "),
23
- gr.inputs.Textbox(lines=1, placeholder="Enter description", default="", label = "description 3: ")],
24
  outputs= "textbox",
25
  examples = examples,
26
  title = "word sense disambiguation",
 
11
  output = pipe(raw_input)[0]['generated_text']
12
  return output
13
 
 
 
14
  examples = [["beat", 'The underdog team "beat" the reigning champion.', " A main accent or rhythmic unit in music or poetry. " , " To strike repeatedly and violently so as to hurt or injure.", " To defeat (someone) in a game or other competitive situation. "], ["shell", 'The first "shell" exploded in mid air taking out an enemy plane.', "The hard protective outer case of a mollusk or crustacean.", "An explosive artillery projectile or bomb.", "Something resembling or likened to a shell because of its shape or its function as an outer case."]]
15
 
16
+ word_mask = gr.inputs.Textbox(lines=1, placeholder= "Enter Word to Mask", default="", label = "Based on the context, which description best matches this word: ")
17
+ input_context = gr.inputs.Textbox(lines=1, placeholder="Enter context", default="", label = "context: ")
18
+ input_desc1 = gr.inputs.Textbox(lines=1, placeholder="Enter description", default="", label = "description 1: ")
19
+ input_desc2 = gr.inputs.Textbox(lines=1, placeholder="Enter description", default="", label = "description 2: ")
20
+ input_desc3 = gr.inputs.Textbox(lines=1, placeholder="Enter description", default="", label = "description 3: ")
21
+
22
  gr.Interface(wsd_gen,
23
+ inputs = [word_mask , input_context, input_desc1, input_desc2, input_desc3],
 
 
 
 
24
  outputs= "textbox",
25
  examples = examples,
26
  title = "word sense disambiguation",