File size: 371 Bytes
45604d4
 
 
30354e1
648c5dd
 
45604d4
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import streamlit as st
from transformers import pipeline

# generator = pipeline(model="meta-llama/Llama-2-7b-chat-hf") # gated model
# generator = pipeline(model="TheBloke/CapybaraHermes-2.5-Mistral-7B-GPTQ") # Error
generator = pipeline(model="xai-org/grok-1")
prompt = st.text_area('Your prompt: ')
res = generator(prompt)

if res:
    out = pipe(res)
    st.json(out)