File size: 635 Bytes
b02a8ce
 
0710e36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr

# Load the fine-tuned Llama 2 model
model = gr.load("models/mlabonne/llama-2-7b-guanaco")

# Create a Gradio interface
iface = gr.Interface(
    fn=model,  # Use the fine-tuned Llama 2 model as the function
    inputs="text",  # Input is text
    outputs="text",  # Output is also text
    live=True,  # Enable live updates without button click
    interpretation="default",  # Use default interpretation for text outputs
    theme="compact",  # Use a compact theme for the interface
    description="Fine-tuned Llama 2: Enter a prompt to get a model-generated response."
)

# Launch the Gradio app
iface.launch()