Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -74,26 +74,19 @@ def display_wordcloud(text_data):
|
|
74 |
ax.axis("off")
|
75 |
st.pyplot(fig)
|
76 |
|
77 |
-
# Function to download CSV file
|
78 |
-
def download_csv(df):
|
79 |
-
csv = df.to_csv(index=False)
|
80 |
-
b64 = base64.b64encode(csv.encode()).decode() # B64 encoding
|
81 |
-
href = f'<a href="data:file/csv;base64,{b64}" download="sentiment_analysis_results.csv">Download CSV File</a>'
|
82 |
-
st.markdown(href, unsafe_allow_html=True)
|
83 |
-
|
84 |
# Streamlit UI
|
85 |
st.set_page_config(page_title="Sentiment Analysis App", page_icon=":smiley:")
|
86 |
st.title("Sentiment Analysis App")
|
87 |
|
88 |
# Sidebar
|
89 |
st.sidebar.title("Options")
|
90 |
-
input_option = st.sidebar.
|
91 |
-
selected_model = st.sidebar.
|
92 |
-
"Select Sentiment Analysis Model",
|
93 |
)
|
94 |
-
result_option = st.sidebar.
|
95 |
"Select Result Display Option",
|
96 |
-
|
97 |
)
|
98 |
|
99 |
# Main content
|
|
|
74 |
ax.axis("off")
|
75 |
st.pyplot(fig)
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
# Streamlit UI
|
78 |
st.set_page_config(page_title="Sentiment Analysis App", page_icon=":smiley:")
|
79 |
st.title("Sentiment Analysis App")
|
80 |
|
81 |
# Sidebar
|
82 |
st.sidebar.title("Options")
|
83 |
+
input_option = st.sidebar.selectbox("Select Input Option", ["Free Text", "CSV Files"])
|
84 |
+
selected_model = st.sidebar.selectbox(
|
85 |
+
"Select Sentiment Analysis Model", ["VADER", "TextBlob", "Hugging Face"]
|
86 |
)
|
87 |
+
result_option = st.sidebar.selectbox(
|
88 |
"Select Result Display Option",
|
89 |
+
["DataFrame", "Pie Chart", "Bar Chart", "Keyword Frequency", "Word Cloud", "Comparative Sentiment Analysis"],
|
90 |
)
|
91 |
|
92 |
# Main content
|