File size: 723 Bytes
e11a8b4
 
4264afd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3240a08
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr

def respond(msg, history, *args):
    return "response"

demo = gr.ChatInterface(
    respond,
    additional_inputs=[
        gr.Dropdown([
                'Meta-Llama-3-70B-Instruct-Q3_K_M.gguf',
                'gemma-2-27b-it-Q8_0.gguf'
            ],
            value="gemma-2-27b-it-Q8_0.gguf",
            label="Model"
        ),
        gr.Textbox(value="You are a helpful assistant.", label="System message"),
        gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
    ],
    description="Llama-cpp-agent: Chat multi llm selection",
    chatbot=gr.Chatbot(
        scale=1, 
        placeholder="PLACEHOLDER",
        show_copy_button=True
    )
)

demo.launch()