|
|
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: |
|
|
|
|
|
processed_data = process_uploaded_file(uploaded_file) |
|
|
|
|
|
st.write(processed_data) |
|
|
|
|
|
|
|
|
st.text('Processing translation...') |
|
|
trans = tras_sum(uploaded_file.name) |
|
|
st.write(trans) |
|
|
|
|
|
|
|
|
st.text('Generating a Sentiment result...') |
|
|
senti = sentiment(trans) |
|
|
st.write(senti) |
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
main() |