Joshnicholas commited on
Commit
54c7527
·
verified ·
1 Parent(s): 69b744b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -30,8 +30,13 @@ def named(input):
30
  merged_word = merge_tokens(output)
31
  return {'text': input, 'entities': merged_word}
32
 
33
- a = gr.Interface(fn=named,
34
- inputs=[gr.Textbox(label="Text input", lines= 2)],
35
- outputs=[gr.HighlightedText(label='Labelled text')],
36
- examples=examples)
37
- a.launch()
 
 
 
 
 
 
30
  merged_word = merge_tokens(output)
31
  return {'text': input, 'entities': merged_word}
32
 
33
+ init = 'At Los Alamos, which was isolated for security, Feynman amused himself by investigating the combination locks on the cabinets and desks of physicists. He often found that they left the lock combinations on the factory settings, wrote the combinations down, or used easily guessable combinations like dates.'
34
+
35
+ demo = gr.Interface(fn=named,
36
+ inputs=[gr.Textbox(label="Text input", value=init, lines= 2)],
37
+ outputs=[gr.HighlightedText(label='Labelled text')])
38
+
39
+
40
+ #Launching the gradio app
41
+ if __name__ == "__main__":
42
+ demo.launch(debug=True)