2 Commits 3f589c523b ... 467b4a4186

Author SHA1 Message Date
  Air 467b4a4186 1.llm测试提取 3 weeks ago
  Air bccfe4c3a8 1.llm测试提取 3 weeks ago

BIN
data/source/机械相关专业数据汇总/爬虫数据(山东省数据)/【最终】2024_11_03_临沂职业学院-智联招聘和前程无忧数据.xls


+ 15 - 1
src/kg_construction/llm_construct_kg.py

@@ -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)