import gradio as gr from transformers import pipeline pipe = pipeline( "text-generation", model="lazarus19/OpenHusky" ) def chat(message): result = pipe( message, max_new_tokens=128, do_sample=True, temperature=0.7 ) return result[0]["generated_text"] demo = gr.Interface( fn=chat, inputs=gr.Textbox(label="Message"), outputs=gr.Textbox(label="Response"), title="OpenHusky" ) demo.launch()