Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,25 +29,25 @@ During the journey, they planned to visit several locations including Los Angele
|
|
| 29 |
For added security, she enabled two-factor authentication on all her accounts and noted down her backup email, emily.backup@example.org, in case she needed to recover any information.'''
|
| 30 |
|
| 31 |
|
| 32 |
-
|
| 33 |
-
input_text =
|
| 34 |
-
|
| 35 |
|
| 36 |
st.divider()
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
|
|
| 29 |
For added security, she enabled two-factor authentication on all her accounts and noted down her backup email, emily.backup@example.org, in case she needed to recover any information.'''
|
| 30 |
|
| 31 |
|
| 32 |
+
|
| 33 |
+
input_text = st.text_input("Enter your text...", default_value)
|
| 34 |
+
|
| 35 |
|
| 36 |
st.divider()
|
| 37 |
|
| 38 |
+
|
| 39 |
+
doc = nlp(input_text)
|
| 40 |
+
|
| 41 |
+
# # Display a section header:
|
| 42 |
+
# st.header("Dependency visualizer")`
|
| 43 |
+
# # style="dep" indicates dependencies should be generated.
|
| 44 |
+
# dep_svg = displacy.render(doc, style=”dep, jupyter=False)
|
| 45 |
+
# st.image(dep_svg, width=400, use_column_width=’never’)
|
| 46 |
+
|
| 47 |
+
# Add a section header:
|
| 48 |
+
st.header("Entity visualizer")
|
| 49 |
+
# Take the text from the input field and render the entity html.
|
| 50 |
+
# Note that style="ent" indicates entities.
|
| 51 |
+
ent_html = displacy.render(doc, style="ent", jupyter=False)
|
| 52 |
+
# Display the entity visualization in the browser:
|
| 53 |
+
st.markdown(ent_html, unsafe_allow_html=True)
|