IcedSundae commited on
Commit
316666d
·
verified ·
1 Parent(s): 099a94b

This is the app.py

Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from langchain.llms import CTransformers
3
+
4
+ # Load model
5
+ llm = CTransformers(
6
+ model="IcedSundae/Krog-v1",
7
+ model_type="llama",
8
+ config={"gpu_layers": 0} # Change to GPU layers if using paid plan
9
+ )
10
+
11
+ def chat(message):
12
+ response = llm(message)
13
+ return response
14
+
15
+ # Create UI
16
+ iface = gr.Interface(fn=chat, inputs="text", outputs="text", title="Krog")
17
+ iface.launch()