Spaces:
Runtime error
Runtime error
File size: 365 Bytes
e24c717 f0d1094 e24c717 f0d1094 e24c717 f0d1094 e24c717 f0d1094 e24c717 f0d1094 e24c717 a8c8525 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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()
|