Vincent Claes
update for vacancies
caf0bce
raw
history blame
No virus
835 Bytes
import gradio as gr
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
title = "Vacancy Keyword Extraction"
description = "Add a vacancy and ask what keyword you would like to retrieve. For example, What is the job title? What is the city? What is the start date?"
gr.Interface.load("huggingface/deepset/roberta-base-squad2",
inputs=[gr.inputs.Textbox(lines=10, label="Vacancy", placeholder="Paste the context of a vacancy."),
gr.inputs.Textbox(lines=2, label="Question", placeholder="Ask what you want to retrieve from the vacancy.")],
outputs=[gr.outputs.Textbox(label="Answer"),
gr.outputs.Label(label="Probability")],
title=title, description=description).launch(share=False)