def generate_response(prompt): response = llm.create_chat_completion( messages=[ { "role": "user", "content": prompt } ] ) return response["choices"][0]["message"]["content"] iface = gr.Interface( fn=generate_response, inputs=gr.inputs.Textbox(lines=2, placeholder="Enter your prompt here..."), outputs=gr.outputs.Textbox(), title="Llama Model", description="A Gradio interface to interact with the Llama model.", ) iface.launch()