Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +15 -14
src/streamlit_app.py
CHANGED
|
@@ -410,7 +410,8 @@ def generate_html_report(df, text_input, elapsed_time, df_topic_data):
|
|
| 410 |
<div class="container">
|
| 411 |
<h1>Entity and Topic Analysis Report</h1>
|
| 412 |
<div class="metadata">
|
| 413 |
-
<p><strong>Generated
|
|
|
|
| 414 |
<p><strong>Processing Time:</strong> {elapsed_time:.2f} seconds</p>
|
| 415 |
</div>
|
| 416 |
<h2>1. Analyzed Text & Extracted Entities</h2>
|
|
@@ -487,7 +488,17 @@ expander.write("""**Named Entities:** This DataHarvest web app predicts nine (9)
|
|
| 487 |
**Technical issues:** If your connection times out, please refresh the page or reopen the app's URL.""")
|
| 488 |
|
| 489 |
|
| 490 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 491 |
|
| 492 |
st.markdown("For any errors or inquiries, please contact us at [info@nlpblogs.com](mailto:info@nlpblogs.com)")
|
| 493 |
|
|
@@ -662,7 +673,7 @@ if st.session_state.show_results:
|
|
| 662 |
path=[px.Constant("All Entities"), 'category', 'label', 'text'],
|
| 663 |
values='score',
|
| 664 |
color='category',
|
| 665 |
-
|
| 666 |
color_discrete_sequence=px.colors.qualitative.Dark24
|
| 667 |
)
|
| 668 |
fig_treemap.update_layout(margin=dict(t=10, l=10, r=10, b=10))
|
|
@@ -741,15 +752,5 @@ if st.session_state.show_results:
|
|
| 741 |
type="secondary"
|
| 742 |
)
|
| 743 |
|
| 744 |
-
|
| 745 |
-
st.write("Use the following code to embed the DataHarvest web app on your website. Feel free to adjust the width and height values to fit your page.")
|
| 746 |
-
code = '''
|
| 747 |
-
<iframe
|
| 748 |
-
src="https://aiecosystem-dataharvest.hf.space"
|
| 749 |
-
frameborder="0"
|
| 750 |
-
width="850"
|
| 751 |
-
height="450"
|
| 752 |
-
></iframe>
|
| 753 |
-
'''
|
| 754 |
-
st.code(code, language="html")
|
| 755 |
|
|
|
|
| 410 |
<div class="container">
|
| 411 |
<h1>Entity and Topic Analysis Report</h1>
|
| 412 |
<div class="metadata">
|
| 413 |
+
<p><strong>Generated at:</strong> {time.strftime('%Y-%m-%d')}</p>
|
| 414 |
+
|
| 415 |
<p><strong>Processing Time:</strong> {elapsed_time:.2f} seconds</p>
|
| 416 |
</div>
|
| 417 |
<h2>1. Analyzed Text & Extracted Entities</h2>
|
|
|
|
| 488 |
**Technical issues:** If your connection times out, please refresh the page or reopen the app's URL.""")
|
| 489 |
|
| 490 |
|
| 491 |
+
with st.expander("Embed"):
|
| 492 |
+
st.write("Use the following code to embed the DataHarvest web app on your website. Feel free to adjust the width and height values to fit your page.")
|
| 493 |
+
code = '''
|
| 494 |
+
<iframe
|
| 495 |
+
src="https://aiecosystem-dataharvest.hf.space"
|
| 496 |
+
frameborder="0"
|
| 497 |
+
width="850"
|
| 498 |
+
height="450"
|
| 499 |
+
></iframe>
|
| 500 |
+
'''
|
| 501 |
+
st.code(code, language="html")
|
| 502 |
|
| 503 |
st.markdown("For any errors or inquiries, please contact us at [info@nlpblogs.com](mailto:info@nlpblogs.com)")
|
| 504 |
|
|
|
|
| 673 |
path=[px.Constant("All Entities"), 'category', 'label', 'text'],
|
| 674 |
values='score',
|
| 675 |
color='category',
|
| 676 |
+
|
| 677 |
color_discrete_sequence=px.colors.qualitative.Dark24
|
| 678 |
)
|
| 679 |
fig_treemap.update_layout(margin=dict(t=10, l=10, r=10, b=10))
|
|
|
|
| 752 |
type="secondary"
|
| 753 |
)
|
| 754 |
|
| 755 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 756 |
|