fistyee commited on
Commit
b51c467
·
2 Parent(s): addec06 d7e53f4

add viewer

Browse files
Files changed (1) hide show
  1. evaluation_processor.py +7 -0
evaluation_processor.py CHANGED
@@ -47,6 +47,7 @@ class EvaluationProcessor:
47
  # 打开文件并指定文件类型
48
  files = {
49
  'file': (file_name, open(file_path, 'rb'), file_type)
 
50
  }
51
  data = {
52
  'musicId': music_id,
@@ -67,11 +68,17 @@ class EvaluationProcessor:
67
  params = {'taskId': task_id}
68
  while True:
69
  result_response = requests.get(self.result_url, headers=self.headers, params=params)
 
70
  print(result_response)
71
  if result_response.status_code == 200:
72
  result_data = result_response.json()
73
  status = result_data['data']['status']
74
  print(result_data)
 
 
 
 
 
75
  if status in ['pending', 'processing']:
76
  print(f'Task is still {status}...')
77
  time.sleep(2)
 
47
  # 打开文件并指定文件类型
48
  files = {
49
  'file': (file_name, open(file_path, 'rb'), file_type)
50
+
51
  }
52
  data = {
53
  'musicId': music_id,
 
68
  params = {'taskId': task_id}
69
  while True:
70
  result_response = requests.get(self.result_url, headers=self.headers, params=params)
71
+ <<<<<<< HEAD
72
  print(result_response)
73
  if result_response.status_code == 200:
74
  result_data = result_response.json()
75
  status = result_data['data']['status']
76
  print(result_data)
77
+ =======
78
+ if result_response.status_code == 200:
79
+ result_data = result_response.json()
80
+ status = result_data['data']['status']
81
+ >>>>>>> 74ce80e943b4ce0cd7adf97b446c53f154aaa6ef
82
  if status in ['pending', 'processing']:
83
  print(f'Task is still {status}...')
84
  time.sleep(2)