Spaces:
Sleeping
Sleeping
File size: 396 Bytes
316666d 4303cdd 316666d 4303cdd 76a64a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import gradio as gr
from langchain.llms import CTransformers
# Load model
llm = CTransformers(
model="IcedSundae/Krog-v1",
model_type="llama",
config={"gpu_layers": 0} # Change to GPU layers if using paid plan
)
def chat(message):
response = llm(message)
return response
# Create UI
iface = gr.Interface(fn=chat, inputs="text", outputs="text", title="Krog")
iface.launch() |