话题水军识别应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.9 KiB

  1. #coding=utf8
  2. import sys
  3. import requests
  4. import json
  5. import time
  6. # #url = 'http://0.0.0.0:5033'
  7. # """
  8. # url = 'http://20.0.2.6:5055/classify_event'
  9. # url = 'http://20.0.2.6:5055/is_about_china'
  10. # url = 'http://20.0.2.6:5055/associated_words'
  11. # """
  12. # url = 'http://127.0.0.1:9008/paper'
  13. #
  14. # # url_file ="http://172.18.1.130:9985/group33/default/20230415/09/15/1/“GF-1”影像质量评价及矿区土地利用分类潜力研究_陈明.docx"
  15. # url_file="/opt/Project_kongtianyuan/inputfile/"
  16. # filename = "“GF-1”影像质量评价及矿区土地利用分类潜力研究"
  17. #
  18. # data = {"url":url_file,"filename":filename}
  19. # data_str = json.dumps(data)
  20. #
  21. # r = requests.post(url,data=str(data_str))
  22. # print(r.text)
  23. # # res =json.loads(r.text)
  24. # # print(res)
  25. raw_data={
  26. "metadata":{
  27. "address":"http://172.24.12.126:9013/ASR/",
  28. "index":0,
  29. "admin":{
  30. "datasource":"2_任务提取"
  31. },
  32. "output":{
  33. "output_type":"table",
  34. "label_col":[
  35. "ASR识别内容"
  36. ]
  37. },
  38. "input":{
  39. "input_type":"text",
  40. "label":[
  41. "2_任务提取"
  42. ]
  43. },
  44. "user":{
  45. "tag":""
  46. }
  47. },
  48. "data":{
  49. "1_文件上传":"{\"fileId\":\"53aa330b4e484c9bdeb7ff35e335a6f6\",\"fileName\":\"lKTZNen6aak.mp4\",\"filePath\":\"/group33/default/20230828/15/48/1/lKTZNen6aak.mp4\",\"fileType\":\"mp4\",\"fileUrl\":\"http://172.18.1.130:9985/group33/default/20230828/15/48/1/lKTZNen6aak.mp4\",\"ossPath\":\"/group33/default/20230828/15/48/1/lKTZNen6aak.mp4\"}",
  50. "businessKey":"19615b029da477fb",
  51. "2_任务提取":"[{\"fileId\":\"53aa330b4e484c9bdeb7ff35e335a6f6\",\"fileName\":\"lKTZNen6aak.mp4\",\"filePath\":\"/group33/default/20230828/15/48/1/lKTZNen6aak.mp4\",\"fileType\":\"mp4\",\"fileUrl\":\"http://172.18.1.130:9985/group33/default/20230828/15/48/1/lKTZNen6aak.mp4\",\"ossPath\":\"/group33/default/20230828/15/48/1/lKTZNen6aak.mp4\"}]"
  52. },
  53. "created":1691004265000,
  54. "module":"ASR",
  55. "start_tag":"false",
  56. "multi_branch":0,
  57. "last_edit":1693417201000,
  58. "next_app_id":[
  59. {
  60. "start_id":154,
  61. "edge_id":75,
  62. "end_id":155
  63. }
  64. ],
  65. "transfer_id":3,
  66. "version":1,
  67. "blueprint_id":4,
  68. "scenes_id":5,
  69. "scenario":{
  70. "dataloss":1,
  71. "autoCommitTriggerLast":1,
  72. "maxErrors":3,
  73. "autoCommit":1,
  74. "freshVariables":1
  75. },
  76. "wait_condition":[
  77. ],
  78. "scheduling":{
  79. "interval":-1,
  80. "type":"single"
  81. },
  82. "name":"ASR",
  83. "businessKey":"19615b029da477fb",
  84. "id":154,
  85. "position":[
  86. 100,
  87. 200
  88. ],
  89. "describe":"ASR识别"
  90. }
  91. allFile = raw_data["data"]["2_任务提取"]
  92. currentFile = eval(allFile)
  93. print(currentFile)
  94. print(type(currentFile))
  95. # filejson = json.loads(currentFile)
  96. # file = currentFile["fileUrl"]
  97. # fileName = currentFile["fileName"]
  98. # print(file)