File size: 701 Bytes
5b60a87
6b10d1a
14ed4a6
 
 
4b46184
14ed4a6
 
30cbf95
 
 
 
4b46184
14ed4a6
 
 
 
 
d5724ff
14ed4a6
 
 
4b46184
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr

# Load the BLOOM model
model = gr.load("models/CreitinGameplays/bloom-3b-conversational")

# Define the interface with default prompt
interface = gr.Interface(
    fn=model,
    inputs=[
      gr.Textbox(label="Text Prompt", value="<|system|> You are a helpful AI assistant </s> <|prompter|> What is an AI? </s> <|assistant|>"),
      gr.Slider(minimum=1, maximum=256, label="Max New Tokens", value=128),
  ],
    outputs="text",
    css="""
        .gr-form textarea {
            height: 100px;  /* Adjust height as needed */
        }
    """,  # Optional: Adjust input text area height
    description="Interact with BLOOM",
)

# Launch the Gradio interface
interface.launch()