Spaces:
Sleeping
Sleeping
File size: 640 Bytes
b1db100 e59ae47 b1db100 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import streamlit as st
from transformers import pipeline
pipe = pipeline("text-classification", model="distilbert-base-uncased-finetuned-sst-2-english")
# 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) |