Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,6 +65,17 @@ llm = ChatOpenAI(model="gpt-4o-mini", temperature=0, max_tokens=1500, openai_api
|
|
| 65 |
# Load spaCy NER model
|
| 66 |
nlp = spacy.load("en_core_web_sm")
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
# --- spaCy Extraction ---
|
| 69 |
def extract_with_spacy(text):
|
| 70 |
doc = nlp(text)
|
|
|
|
| 65 |
# Load spaCy NER model
|
| 66 |
nlp = spacy.load("en_core_web_sm")
|
| 67 |
|
| 68 |
+
# --- User Prompt Template ---
|
| 69 |
+
hr_user_message_template = """
|
| 70 |
+
Consider the following ###Context and ###Question:
|
| 71 |
+
|
| 72 |
+
###Context
|
| 73 |
+
{context}
|
| 74 |
+
|
| 75 |
+
###Question
|
| 76 |
+
{question}
|
| 77 |
+
"""
|
| 78 |
+
|
| 79 |
# --- spaCy Extraction ---
|
| 80 |
def extract_with_spacy(text):
|
| 81 |
doc = nlp(text)
|