Spaces:
Sleeping
Sleeping
File size: 633 Bytes
7c16f82 3223286 7c16f82 3223286 7c16f82 3223286 |
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 AutoTokenizer, AutoModel
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("medicalai/ClinicalBERT")
model = AutoModel.from_pretrained("medicalai/ClinicalBERT")
# Define app layout
st.title("ClinicalBERT Inference App")
input_text = st.text_input("Enter clinical text:")
if input_text:
# Preprocess input
inputs = tokenizer(input_text, return_tensors="pt")
# Perform inference
with st.spinner("Processing..."):
outputs = model(**inputs)
# Display results (adjust based on model output format)
st.write("Model outputs:", outputs)
|