import gradio as gr # Load the model model = gr.load( "models/dphn/Dolphin-Mistral-24B-Venice-Edition", provider="featherless-ai", ) def chat_with_model(prompt): try: # Call the model with a single string, NOT wrapped in a list # This avoids the list-of-list issue response = model(prompt) return response # Usually a string already except Exception as e: return f"⚠️ Error: {str(e)}" # Gradio interface with gr.Blocks(title="Dolphin Mistral Chatbot") as demo: gr.Markdown("### 🐬 Dolphin Mistral 24B Chatbot") with gr.Row(): with gr.Column(scale=3): user_input = gr.Textbox(label="Your Message", placeholder="Type 'hi'", lines=3) submit_btn = gr.Button("Send") with gr.Column(scale=2): output_box = gr.Textbox(label="AI Response", lines=10) submit_btn.click(chat_with_model, inputs=user_input, outputs=output_box) demo.launch()