|
@@ -1,5 +1,19 @@
|
|
|
import ollama
|
|
|
|
|
|
+from data.analyze_data.analyze_pdf import readPdf
|
|
|
+
|
|
|
+
|
|
|
def get_response_vicuna(prompt):
|
|
|
content = ollama.generate(model='llama3:latest', prompt=prompt)
|
|
|
- return content['response']
|
|
|
+ return content['response']
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+if __name__ == "__main__":
|
|
|
+ path = '../../data/source/机械相关专业数据汇总/专业分类数据(岗位分析套表、技能等级标准等)/460101【机械设计与制造专业】/460101【机械设计与制造专业】典型岗位的岗位标准分析套表/460101【机械设计与制造专业】典型岗位的岗位标准分析套表-济南职业学院交付产出/460101【机械设计与制造专业】典型岗位的岗位标准分析套表.pdf'
|
|
|
+ pageNumber = 3
|
|
|
+ context = readPdf(path, pageNumber)
|
|
|
+ #print(context)
|
|
|
+
|
|
|
+ respond = get_response_vicuna("请对以下文本提取三元组:" + context)
|
|
|
+ print(respond)
|