Spaces:
Sleeping
Sleeping
Update generate_summary_and_embedding.py
Browse files
generate_summary_and_embedding.py
CHANGED
|
@@ -71,10 +71,10 @@ def generate_summary_and_embedding(text, text_type="resume", model_id="sentence-
|
|
| 71 |
|
| 72 |
summary = generate_summary(text, text_type, llm=pipe)
|
| 73 |
section_texts = extract_section_text(summary)
|
| 74 |
-
|
| 75 |
embeddings = {
|
| 76 |
section: embedder.encode(content, convert_to_tensor=True)
|
| 77 |
for section, content in section_texts.items()
|
| 78 |
}
|
| 79 |
-
|
| 80 |
return embeddings, section_texts
|
|
|
|
| 71 |
|
| 72 |
summary = generate_summary(text, text_type, llm=pipe)
|
| 73 |
section_texts = extract_section_text(summary)
|
| 74 |
+
|
| 75 |
embeddings = {
|
| 76 |
section: embedder.encode(content, convert_to_tensor=True)
|
| 77 |
for section, content in section_texts.items()
|
| 78 |
}
|
| 79 |
+
print(embeddings)
|
| 80 |
return embeddings, section_texts
|