File size: 320 Bytes
26642c1 69e99ce 26642c1 | 1 2 3 4 5 6 7 8 9 10 11 12 | # Use a pipeline as a high-level helper
from transformers import pipeline
# import streamlit
import streamlit as st
pipe = pipeline("text-generation", model="OpenAssistant/codellama-13b-oasst-sft-v10")
user_input = st.text_input("Enter a prompt:")
if user_input:
response = pipe(user_input)
st.write(response) |