File size: 614 Bytes
5b60a87
 
95f1c49
49d7b84
 
 
 
dfc8a9e
49d7b84
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr

gr.load("models/CreitinGameplays/bloom-3b-conversational")

interface = gr.Interface(
  fn=lambda prompt="", max_tokens=128: gr.Textbox.submit(value=prompt),
  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=1024, label="Max New Tokens", value=128),
  ],
  outputs=[],
  title="Bloom 3b Conversational Assistant",
  description="Talk to Bloom 3b using a text prompt and adjust the maximum number of tokens for response generation.",
)

interface.launch()