File size: 559 Bytes
80a9adc
 
6282da4
80a9adc
6282da4
 
 
 
 
 
 
 
 
80a9adc
 
6282da4
80a9adc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

# Define the Gradio interface
iface = gr.Interface(
    fn=generate_response,
    inputs=[
        gr.inputs.Textbox(lines=2, label="Input Prompt"),
        gr.inputs.Slider(minimum=50, maximum=200, step=10, default=100, label="Max Length"),
        gr.inputs.Slider(minimum=0.1, maximum=1.0, step=0.1, default=0.7, label="Temperature")
    ],
    outputs=gr.outputs.Textbox(label="Generated Response"),
    title="Llama 2 Chatbot",
    description="Interact with the Llama 2 model using Gradio."
)

# Launch the interface
iface.launch()