Spaces:
Runtime error
Runtime error
from llama_cpp import Llama | |
import gradio as gr | |
llm = Llama( | |
model_path="https://huggingface.co/bartowski/MegaBeam-Mistral-7B-512k-GGUF/resolve/main/MegaBeam-Mistral-7B-512k-Q4_K_M.gguf", | |
n_ctx=8192, | |
n_threads=4 | |
) | |
def chat(prompt): | |
output = llm(prompt, max_tokens=512, temperature=0.7) | |
return output["choices"][0]["text"] | |
gr.Interface(fn=chat, inputs="text", outputs="text", title="🧠 MegaBeam Mistral 512k Chatbot").launch() | |