from ctransformers import AutoModelForCausalLM import gradio as gr import random import time def call_chat(message): llm = AutoModelForCausalLM.from_pretrained("mistralai/Mixtral-8x7B-Instruct-v0.1", model_type="Mistral") for text in llm(message, stream=True): return text gr.ChatInterface(call_chat).launch()