Spaces:
Sleeping
Sleeping
import streamlit as st | |
from transformers import pipeline | |
st.set_page_config( | |
page_title="LLAMA2", | |
page_icon="π¦", | |
layout="centered", | |
initial_sidebar_state="expanded" | |
) | |
st.markdown( | |
body = "# <center>FINE-TUNED LLAMA2 7B CHAT HF</center>", | |
unsafe_allow_html = True | |
) | |
text="""4Bit QLoRA Fine-Tuned LLM on English Quotes Dataset.""" | |
st.caption(text) | |
text_input = st.text_area( | |
label = "Prompt...", | |
value = "Tell me a joke." | |
) | |
model_id = "iamsubrata/Llama-2-7b-chat-hf-sharded-bf16-fine-tuned" | |
LLM = pipeline( | |
task = "text-generation", | |
model = model_id | |
) | |
if text_input: | |
prompt = st.button( | |
label = "Generate", | |
key = "generate" | |
) | |
if prompt: | |
st.write(LLM(str(prompt))) |