Spaces:
Runtime error
Runtime error
File size: 686 Bytes
2dd7bee 5e200ff 2dd7bee f2f8150 78198ac f06bf00 5e200ff 2dd7bee 5e200ff |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import streamlit as st
from transformers import pipeline
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import datetime
import streamlit as st
#d = st.date_input("Chose the Date for which you are interested in", value=None)
#st.write('You selected:', d)
tokenizer = AutoTokenizer.from_pretrained("nickmuchi/sec-bert-finetuned-finance-classification")
model = AutoModelForSequenceClassification.from_pretrained("nickmuchi/sec-bert-finetuned-finance-classification")
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=device)
text = st.text_area("Enter some text")
if text:
out = pipe(text)
st.json(out)
|