Spaces:
Running
Running
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +5 -2
src/streamlit_app.py
CHANGED
|
@@ -174,7 +174,7 @@ def create_topic_word_bubbles(df_topic_data):
|
|
| 174 |
# Set text to the word
|
| 175 |
text='word',
|
| 176 |
hover_name='word',
|
| 177 |
-
size_max=
|
| 178 |
title='Topic Word Weights (Bubble Chart)',
|
| 179 |
color_discrete_sequence=px.colors.qualitative.Bold,
|
| 180 |
labels={
|
|
@@ -370,7 +370,8 @@ def generate_html_report(df, text_input, elapsed_time, df_topic_data):
|
|
| 370 |
if df_topic_data is not None and not df_topic_data.empty:
|
| 371 |
bubble_figure = create_topic_word_bubbles(df_topic_data)
|
| 372 |
if bubble_figure:
|
| 373 |
-
|
|
|
|
| 374 |
else:
|
| 375 |
topic_charts_html += '<p style="color: red;">Error: Topic modeling data was available but visualization failed.</p>'
|
| 376 |
else:
|
|
@@ -495,7 +496,9 @@ with tab2:
|
|
| 495 |
**Named Entities:** This DataHarvest web app predicts nine (9) labels: "person", "country", "city", "organization", "date", "time", "cardinal", "money", "position"
|
| 496 |
|
| 497 |
**Results:** Results are compiled into a single, comprehensive **HTML report** and a **CSV file** for easy download and sharing.
|
|
|
|
| 498 |
**How to Use:** Type or paste your text into the text area below, press Ctrl + Enter, and then click the 'Results' button.
|
|
|
|
| 499 |
**Technical issues:** If your connection times out, please refresh the page or reopen the app's URL.
|
| 500 |
""")
|
| 501 |
|
|
|
|
| 174 |
# Set text to the word
|
| 175 |
text='word',
|
| 176 |
hover_name='word',
|
| 177 |
+
size_max=40,
|
| 178 |
title='Topic Word Weights (Bubble Chart)',
|
| 179 |
color_discrete_sequence=px.colors.qualitative.Bold,
|
| 180 |
labels={
|
|
|
|
| 370 |
if df_topic_data is not None and not df_topic_data.empty:
|
| 371 |
bubble_figure = create_topic_word_bubbles(df_topic_data)
|
| 372 |
if bubble_figure:
|
| 373 |
+
|
| 374 |
+
topic_charts_html += f'<div class="chart-box">{bubble_figure.to_html(full_html=False, include_plotlyjs="cdn", config={"responsive": True})}</div>'
|
| 375 |
else:
|
| 376 |
topic_charts_html += '<p style="color: red;">Error: Topic modeling data was available but visualization failed.</p>'
|
| 377 |
else:
|
|
|
|
| 496 |
**Named Entities:** This DataHarvest web app predicts nine (9) labels: "person", "country", "city", "organization", "date", "time", "cardinal", "money", "position"
|
| 497 |
|
| 498 |
**Results:** Results are compiled into a single, comprehensive **HTML report** and a **CSV file** for easy download and sharing.
|
| 499 |
+
|
| 500 |
**How to Use:** Type or paste your text into the text area below, press Ctrl + Enter, and then click the 'Results' button.
|
| 501 |
+
|
| 502 |
**Technical issues:** If your connection times out, please refresh the page or reopen the app's URL.
|
| 503 |
""")
|
| 504 |
|