llama.cpp / app.py
kat33's picture
Update app.py
3fae970
raw
history blame
406 Bytes
import gradio as gr
model="TheBloke/Nous-Hermes-13B-GGML"
def question_answer(context, question):
generator = pipeline(model=model, device_map="auto")
text=context + "\n\nQuestion: \"\"\"\n" + question + "\nPlease use markdown formatting for answer. \nAnswer:\n"
return generator(text)
app=gr.Interface(fn=question_answer, inputs=["text", "text"], outputs=["textbox", "text"])
app.launch()