import streamlit as st | |
from audio_recorder_streamlit import audio_recorder | |
from transformers import pipeline | |
from huggingface_hub import login | |
import os | |
HF_token=os.getenv('HF_token') | |
login(token=HF_token) | |
text = st.text_area("enter some text") | |
messages = [ | |
{"role": "user", "content": text}, | |
] | |
pipe = pipeline("text-generation",model="meta-llama/Llama-3.2-1B-Instruct", max_length=2000) | |
out = pipe(messages) | |
st.write(out) |