Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
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)
|