AhmedBou commited on
Commit
f21a056
1 Parent(s): 9527187

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -28
app.py CHANGED
@@ -1,30 +1,3 @@
1
  import gradio as gr
2
 
3
- # Load the model
4
- model = gr.load("models/AhmedBou/JoBert")
5
-
6
- # Define the title and text labels
7
- title = "Classify Job Descriptions at the Span Level"
8
- label_texts = {
9
- "Label_0": "About the Company:",
10
- "Label_1": "Job Description:",
11
- "Label_2": "Job Requirements:",
12
- "Label_3": "Responsibilities:",
13
- "Label_4": "Benefits:",
14
- "Label_5": "Other:"
15
- }
16
-
17
- # Create the Gradio interface
18
- def classify_job_description(text):
19
- return model(text)
20
-
21
- interface = gr.Interface(
22
- fn=classify_job_description,
23
- inputs=gr.components.Textbox(lines=10, placeholder="Enter job description here..."),
24
- outputs=gr.components.Tabular(headers=["Label", "Confidence"]),
25
- title=title,
26
- description="\n".join([f"{key}: {value}" for key, value in label_texts.items()])
27
- )
28
-
29
- # Launch the interface
30
- interface.launch()
 
1
  import gradio as gr
2
 
3
+ gr.load("models/AhmedBou/JoBert").launch()