Spaces:
Running

moa / app.py
zi-1987's picture
Update app.py
887fbf1 verified
Raw History Blame Contribute Delete
290 Bytes
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()