File size: 610 Bytes
52ea0aa 3ec1bd2 52ea0aa 6e806f9 9d24307 6e806f9 e1e0059 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import streamlit as st
from transformers import pipeline
pipe = pipeline("text-classification", model="ProsusAI/finbert")
# Prompt the user to enter financial data, each line treated as a separate string
text_input = st.text_area('Enter financial filing data (one entry per line)')
if text_input:
lines = text_input.strip().split("\n") # Split input by lines
outputs = [pipe(line) for line in lines] # Process each line with the pipeline
for line, out in zip(lines, outputs): # Display original lines and their corresponding output
st.write(f"Text: {line}")
st.json(out)
|