Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from transformers import
|
| 3 |
import torch
|
| 4 |
import pdfplumber
|
| 5 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
| 6 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
def extract_text(file):
|
| 13 |
with pdfplumber.open(file) as pdf:
|
|
@@ -43,7 +46,7 @@ demo = gr.Interface(
|
|
| 43 |
inputs=[gr.File(label="Upload Resume (PDF)"), gr.Textbox(label="Paste Job Description")],
|
| 44 |
outputs=["text"],
|
| 45 |
title="Smart ATS Resume Optimizer",
|
| 46 |
-
description="
|
| 47 |
)
|
| 48 |
|
| 49 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import AutoTokenizer, AutoModel
|
| 3 |
import torch
|
| 4 |
import pdfplumber
|
| 5 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
| 6 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 7 |
|
| 8 |
+
# ----------------------------------------------------------
|
| 9 |
+
# ✅ Load YOUR fine-tuned model from Hugging Face
|
| 10 |
+
# ----------------------------------------------------------
|
| 11 |
+
MODEL_NAME = "Novricana25/ats-bert-model"
|
| 12 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
| 13 |
+
model = AutoModel.from_pretrained(MODEL_NAME)
|
| 14 |
|
| 15 |
def extract_text(file):
|
| 16 |
with pdfplumber.open(file) as pdf:
|
|
|
|
| 46 |
inputs=[gr.File(label="Upload Resume (PDF)"), gr.Textbox(label="Paste Job Description")],
|
| 47 |
outputs=["text"],
|
| 48 |
title="Smart ATS Resume Optimizer",
|
| 49 |
+
description="Analyzes and scores how well a resume matches a job description using your fine-tuned BERT model hosted on Hugging Face.",
|
| 50 |
)
|
| 51 |
|
| 52 |
demo.launch()
|