basic_llm / app.py
savan360's picture
Update app.py
6282da4 verified
raw
history blame
559 Bytes
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()