create streamlit app for qualitative data analysia
To upload files, please first save the app
import streamlit as st
import pandas as pd
import numpy as np
st.title("Qualitative Data Analysis")
# Sample qualitative data
sample_data = {
'Responses': [
"The service was excellent!",
"I had a bad experience.",
"Would recommend to others.",
"Not what I expected.",
"Great customer support."
]
}
data = pd.DataFrame(sample_data)
# Display the data
st.write("### Survey Responses:")
st.table(data)
# Word cloud generation
if st.button("Generate Word Cloud"):
from wordcloud import WordCloud
import matplotlib.pyplot as plt
text = " ".join(data['Responses'].tolist())
wordcloud = WordCloud(width=800, height=400, background_color='white').generate(text)
plt.figure(figsize=(10, 5))
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis('off')
st.pyplot(plt)
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?