File size: 416 Bytes
42631d7
ba182ab
42631d7
ba182ab
42631d7
ba182ab
 
 
42631d7
ba182ab
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr
from transformers import pipeline

qa = pipeline("question-answering", model="deepset/gelectra-base-germanquad")

def answer_question(context, question):
    result = qa(question=question, context=context)
    return result["answer"]

gr.Interface(fn=answer_question,
             inputs=["text", "text"],
             outputs="text",
             title="Versicherungs-QA mit GELECTRA").launch()