DeepShcool / src /streamlit_app.py
AndreiBar's picture
Update src/streamlit_app.py
802e8d9 verified
Raw
History Blame Contribute Delete
417 Bytes
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}")