import streamlit as st from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer # Load your model and tokenizer from Hugging Face model_name = "orYx-models/finetuned-tiny-llama-medical-papers" token = "Tinyllama_secret" # Replace with your actual Hugging Face API token model = AutoModelForSequenceClassification.from_pretrained(model_name, token=token) tokenizer = AutoTokenizer.from_pretrained(model_name, token=token) # Define the pipeline with your model pipe = pipeline("question-answering", model=model, tokenizer=tokenizer) text = st.text_area("Enter some text:") if text: out = pipe(text) st.json(out)