File size: 298 Bytes
4de02dd
2bf87ab
 
 
 
 
 
 
 
 
4de02dd
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr
from langchain_community.llms import CTransformers

llm = CTransformers(model="TheBloke/Llama-2-7b-Chat-GGUF", model_file="llama-2-7b-chat.q4_K_M.gguf"')



def greet(prompt):
    return llm(prompt)



iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()