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()