Spaces:
Sleeping
Sleeping
| 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() |