Spaces:
Build error
Build error
File size: 835 Bytes
caf0bce |
1 2 3 4 5 6 7 8 9 10 11 |
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) |