Download app.py from zi-1987/moa: direct link, hf CLI and curl.
- Browser
- Download file 290 Bytes
-
https://huggingface.co/spaces/zi-1987/moa/resolve/main/app.py
- Command line
-
hf download hf://spaces/zi-1987/moa/app.py
-
curl -L -o app.py https://huggingface.co/spaces/zi-1987/moa/resolve/main/app.py
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() | |