Spaces:
Sleeping
Sleeping
saifeddinemk
commited on
Commit
•
8f30f12
1
Parent(s):
289726b
Init Commit
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from sentence_transformers import SentenceTransformer, util
|
2 |
-
from transformers import pipeline
|
3 |
import gradio as gr
|
4 |
import nltk
|
5 |
|
@@ -23,10 +23,8 @@ def summarize_text(text, max_length=100, min_length=25):
|
|
23 |
# Summarize the input text
|
24 |
summary = summarizer(text, max_length=max_length, min_length=min_length, do_sample=False)
|
25 |
return summary[0]["summary_text"]
|
26 |
-
except PipelineException as e:
|
27 |
-
return f"Error summarizing text: {e}"
|
28 |
except Exception as e:
|
29 |
-
return f"
|
30 |
|
31 |
def match_cv_to_jobs(cv_text, job_descriptions):
|
32 |
debug_info = "Debug Info:\n"
|
|
|
1 |
from sentence_transformers import SentenceTransformer, util
|
2 |
+
from transformers import pipeline
|
3 |
import gradio as gr
|
4 |
import nltk
|
5 |
|
|
|
23 |
# Summarize the input text
|
24 |
summary = summarizer(text, max_length=max_length, min_length=min_length, do_sample=False)
|
25 |
return summary[0]["summary_text"]
|
|
|
|
|
26 |
except Exception as e:
|
27 |
+
return f"Error summarizing text: {e}"
|
28 |
|
29 |
def match_cv_to_jobs(cv_text, job_descriptions):
|
30 |
debug_info = "Debug Info:\n"
|