Spaces:
Build error
Build error
Vincent Claes
commited on
Commit
•
caf0bce
1
Parent(s):
5e6c2da
update for vacancies
Browse files- app.py +11 -0
- requirements.txt +1 -0
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
|
3 |
+
title = "Vacancy Keyword Extraction"
|
4 |
+
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?"
|
5 |
+
|
6 |
+
gr.Interface.load("huggingface/deepset/roberta-base-squad2",
|
7 |
+
inputs=[gr.inputs.Textbox(lines=10, label="Vacancy", placeholder="Paste the context of a vacancy."),
|
8 |
+
gr.inputs.Textbox(lines=2, label="Question", placeholder="Ask what you want to retrieve from the vacancy.")],
|
9 |
+
outputs=[gr.outputs.Textbox(label="Answer"),
|
10 |
+
gr.outputs.Label(label="Probability")],
|
11 |
+
title=title, description=description).launch(share=False)
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
transformers
|