File size: 528 Bytes
dae8775 6182354 dae8775 6182354 dae8775 6182354 dae8775 6182354 dae8775 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
from llama_cpp import Llama
# Load model (gunakan versi GGUF yang ringan)
model_path = "TheBloke/MythoMax-L2-13B-GGUF/mythomax.gguf"
llm = Llama(model_path=model_path, n_ctx=2048)
def chat(input_text):
output = llm(input_text, max_tokens=100)
return output["choices"][0]["text"]
iface = gr.Interface(
fn=chat,
inputs="text",
outputs="text",
title="Dika AI - MythoMax Lite",
description="Chatbot AI berbasis MythoMax 13B GGUF, optimized for Hugging Face CPU!"
)
iface.launch()
|