Spaces:
Runtime error
Runtime error
File size: 649 Bytes
f34c5f4 f346719 f34c5f4 f346719 f34c5f4 f346719 f34c5f4 f346719 f34c5f4 f346719 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import streamlit as st
import pandas as pd
from eda import display_eda
from prediction import predict_and_strategy
# Load the data
data = pd.read_csv('threads_reviews.csv')
st.title("Sentiment Analysis and Business Strategy")
# EDA Section
st.header("Exploratory Data Analysis")
if st.checkbox("Show EDA", False): # Checkbox to toggle EDA display
display_eda(data)
# Prediction Section
st.header("Prediction")
user_input = st.text_area("Enter text for sentiment analysis:", "")
if st.button("Analyze"):
sentiment, strategy = predict_and_strategy(user_input)
st.write(f"Sentiment: {sentiment}")
st.write(f"Strategy: {strategy}")
|