Spaces:
Build error
Build error
Commit ·
a50f59e
1
Parent(s): c223424
Update app.py
Browse files2 unmodified lines34567891011121314151617181920212223242540 unmodified lines666768692 unmodified linesclient = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")def my_inference_function(name):return "Hello " + name + "!"gradio_interface = gr.Interface(fn=my_inference_function,inputs="text",outputs="text",examples=[["Jill"],["Sam"]],title="REST API with Gradio and Huggingface Spaces",description="This is a demo of how to build an AI powered REST API with Gradio and Huggingface Spaces – for free! Based on [this article](https://www.tomsoderlund.com/ai/building-ai-powered-rest-api). See the **Use via API** link at the bottom of this page.",article="© Tom Söderlund 2022")gradio_interface.launch()def format_prompt(message, history):prompt = "<s>"for user_prompt, bot_response in history:40 unmodified linesundo_btn=None)demo.queue().launch(show_api=False)2 unmodified lines34567840 unmodified lines495051522 unmodified linesclient = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")def format_prompt(message, history):prompt = "<s>"for user_prompt, bot_response in history:40 unmodified linesundo_btn=None)demo.queue().launch(show_api=True)
app.py+1-18