import streamlit as st import pandas as pd def main(): st.set_page_config(page_title="Emotion analysis", page_icon="🦜") st.header("Turn Your Input Into Sentiment Score") uploaded_file = st.file_uploader("Upload CSV File", type="csv") if uploaded_file is not None: # Process the uploaded file processed_data = process_uploaded_file(uploaded_file) # Display the processed data or perform further actions st.write(processed_data) #Stage 1: Translate and summary the text from Chinese to English and summarize st.text('Processing translation...') trans = tras_sum(uploaded_file.name) st.write(trans) #Stage 2: Sentiment analysis st.text('Generating a Sentiment result...') senti = sentiment(trans) st.write(senti) if __name__ == "__main__": main()