llama2-demo / app.py
learningai's picture
Update app.py
f0d1094
raw
history blame
365 Bytes
import os
import gradio
os.system("gdown 1L0HmkMQ54le2Eel1r3aJVoxsOLFpTodL")
from langchain.llms.llamacpp import LlamaCpp
model_path = "ggml-model-q4_0.bin"
llm = LlamaCpp(model_path=model_path)
def respond(input_text):
response = llm(input_text)
return str(response)
demo = gradio.Interface(fn=respond, inputs='text', outputs='text')
demo.launch()