processing_test / app.py
Mori-kamiyama's picture
Add application file
db134f6
raw
history blame
451 Bytes
import gradio as gr
from llama_cpp import Llama
# gguf形式のモデルファイルのパスを指定してロード
llm = Llama(model_path="Mori-kamiyama/sarashina2-13b-r1/unsloth.Q8_0.gguf")
def generate_text(prompt):
return llm(prompt)
iface = gr.Interface(fn=generate_text,
inputs="text",
outputs="text",
title="GGUFモデルテキストジェネレーター")
iface.launch()