Spaces:
Runtime error
Runtime error
File size: 468 Bytes
77d8893 bd54678 77d8893 bd54678 77d8893 bd54678 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import streamlit as st
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
model_name = "hiieu/Meta-Llama-3-8B-Instruct-function-calling-json-mode"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
pipe = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
text = st.text_area("Enter your text:")
if text:
out = pipe(text)
st.json(out)
|