网友小郑 7 months ago
parent
commit
673472887c
5 changed files with 34 additions and 11 deletions
  1. 7 0
      1.py
  2. BIN
      __pycache__/modelscope.cpython-310.pyc
  3. BIN
      __pycache__/modelscope.cpython-38.pyc
  4. 17 11
      app.py
  5. 10 0
      ollama_qwen2.py

+ 7 - 0
1.py

@@ -0,0 +1,7 @@
+import torch
+
+print(torch.__version__) # 查看torch当前版本号
+
+print(torch.version.cuda) # 编译当前版本的torch使用的cuda版本号
+
+print(torch.cuda.is_available()) # 查看当前cuda是否可用于当前版本的Torch,如果输出True,则表示可用

BIN
__pycache__/modelscope.cpython-310.pyc


BIN
__pycache__/modelscope.cpython-38.pyc


+ 17 - 11
app.py

@@ -53,7 +53,7 @@ def inputMsg():
 
 
     # 生成提示信息
     # 生成提示信息
     prompt = f"""请扮演文本提取工具,把这句话:"{msg}",基于以下因子选择、选址范围和用地类型提取其对应的相关数据,提取结果请严格将json格式字符串输出并保障寄送格式正确无误,
     prompt = f"""请扮演文本提取工具,把这句话:"{msg}",基于以下因子选择、选址范围和用地类型提取其对应的相关数据,提取结果请严格将json格式字符串输出并保障寄送格式正确无误,
-    选址范围 = ['抱坡区','天涯区','崖州区','海棠区','吉阳区' ],
+    选址范围 = ['抱坡区','天涯区','崖州区','海棠区','吉阳区',"青浦区","静安区","浦东新区","松江区','海淀区', '昌平区', '朝阳区' ],
     因子选择 = [
     因子选择 = [
         "高程",
         "高程",
         "坡度",
         "坡度",
@@ -106,26 +106,32 @@ def inputMsg():
         }},
         }},
         "factors": [
         "factors": [
             {{
             {{
-                "type": "水库",
-                "condition": "于",
-                "value": "100"
+                "type": "医疗卫生设施",
+                "condition": "于",
+                "value": "500"
             }},
             }},
             {{
             {{
                 "type": "永久基本农田",
                 "type": "永久基本农田",
                 "condition": "不相交"
                 "condition": "不相交"
             }},
             }},
             {{
             {{
-                "type": "城镇开发边界内",
-                "condition": "包含"
+                "type": "火葬场",
+                "condition": "大于",
+                "value": "1000"
             }},
             }},
             {{
             {{
-                "type": "高程",
-                "condition": "between",
-                "value": "0,100"
-            }}
+                "type": "幼儿园服务半径",
+                "condition": "小于",
+                "value": "1000"
+            }},
+            {{
+                "type": "小学服务半径",
+                "condition": "小于",
+                "value": "1000"
+            }},
         ]
         ]
     }}
     }}
-    factors.type是因子名称,需与因子选择中的信息保持一致
+    factors中type是因子名称,需与因子选择中的信息保持一致
     json中"condition"的值为"gt"、"lt"、"get"、"let"、"between","not_intersect"、"intersect"、"not_contain"、"contain"、"between"
     json中"condition"的值为"gt"、"lt"、"get"、"let"、"between","not_intersect"、"intersect"、"not_contain"、"contain"、"between"
     json中"type"的值如果为"医院"则需改为"医疗卫生设施"
     json中"type"的值如果为"医院"则需改为"医疗卫生设施"
     """
     """

File diff suppressed because it is too large
+ 10 - 0
ollama_qwen2.py


Some files were not shown because too many files changed in this diff