|
import streamlit as st |
|
from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer |
|
|
|
|
|
model_name = "orYx-models/finetuned-tiny-llama-medical-papers" |
|
token = "Tinyllama_secret" |
|
model = AutoModelForSequenceClassification.from_pretrained(model_name, token=token) |
|
tokenizer = AutoTokenizer.from_pretrained(model_name, token=token) |
|
|
|
|
|
pipe = pipeline("text2text-generation", model=model, tokenizer=tokenizer) |
|
|
|
text = st.text_area("Enter some text:") |
|
|
|
if text: |
|
out = pipe(text) |
|
st.json(out) |