Spaces:
Sleeping
Sleeping
Update app.py
Browse files5 unmodified lines678910111291011121314191516171819 unmodified lines383940454647484950515253545556574142435 unmodified linesimport cleantext
def clean_text(text): text = text.replace("''", " ").replace("-\n", " ").replace("\n", " ").strip() return (text)
st.title("Sentiment Analysis")
#st.header('Sentiment Analysis')st.sidebar.image("sent.png")st.sidebar.title("Main Menu")app_mode = st.sidebar.selectbox("Options",["About", "Analyze Text","Clean Text", "Analyze CSV"])["About", "Analyze Text", "Analyze CSV"])
if app_mode == "About": st.subheader("Project Description")19 unmodified lines cleaned_text=cleantext.clean(pre, extra_spaces=True , stopwords=True ,lowercase=True ,numbers=True , punct=True) st.write(cleaned_text)
elif app_mode == "Clean Text": st.subheader("Clean Text") text = st.text_area("Paste text here") button1 = st.button("clean text") if button1: st.write(text) clean = clean_text(text) st.write(clean)
else: with st.expander('Analyze CSV'):app.py+1-18