Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -27,13 +27,13 @@ def get_skills():
|
|
| 27 |
cv_body = request.json.get('cv_body')
|
| 28 |
|
| 29 |
template = """Instruct:
|
| 30 |
-
Take a deep breath to deep understand, and don't this cv vc = {cv_body} . to answer this question and instructions </s>
|
| 31 |
\nOutput:"""
|
| 32 |
|
| 33 |
-
prompt = PromptTemplate(template=template, input_variables=["
|
| 34 |
chain = prompt | llm | StrOutputParser()
|
| 35 |
|
| 36 |
-
ans = chain.invoke({"question": "What are his best skills? write in points","
|
| 37 |
config={
|
| 38 |
# "callbacks": [ConsoleCallbackHandler()]
|
| 39 |
})
|
|
@@ -41,4 +41,5 @@ def get_skills():
|
|
| 41 |
return jsonify({'skills': ans})
|
| 42 |
|
| 43 |
if __name__ == '__main__':
|
| 44 |
-
app.run()
|
|
|
|
|
|
| 27 |
cv_body = request.json.get('cv_body')
|
| 28 |
|
| 29 |
template = """Instruct:
|
| 30 |
+
Take a deep breath to deep understand, and don't this cv vc = {cv_body} . to answer this question and instructions </s>
|
| 31 |
\nOutput:"""
|
| 32 |
|
| 33 |
+
prompt = PromptTemplate(template=template, input_variables=["text"])
|
| 34 |
chain = prompt | llm | StrOutputParser()
|
| 35 |
|
| 36 |
+
ans = chain.invoke({"question": "What are his best skills? write in points","cv_body":cv_body},
|
| 37 |
config={
|
| 38 |
# "callbacks": [ConsoleCallbackHandler()]
|
| 39 |
})
|
|
|
|
| 41 |
return jsonify({'skills': ans})
|
| 42 |
|
| 43 |
if __name__ == '__main__':
|
| 44 |
+
app.run()
|
| 45 |
+
|