File size: 417 Bytes
2cd4815
 
 
 
 
802e8d9
 
2cd4815
e9f880e
2cd4815
e9f880e
 
2cd4815
e9f880e
2cd4815
e9f880e
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import altair as alt
import numpy as np
import pandas as pd
import streamlit as st

from config import Config, config
from pipeline import predict_sentiment

st.title("Text Analyzer")

text = st.text_area("Enter text:", height=150)
analyze = st.button("Analyze")

result_area = st.empty()

if analyze:
    result = predict_sentiment(text, config.task, config.model_name)
    result_area.write(f"**Result:** {result}")