import gradio as gr from huggingface_hub import InferenceClient client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.2") def respond(message, history): response = client.chat_completion(message) return response.choices[0].message.content gr.ChatInterface(respond).launch()