janasumit2911 commited on
Commit
954274c
·
verified ·
1 Parent(s): ef83f58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -61,7 +61,7 @@ def process_audio_file(file_data, url):
61
  if inferred_class == "Silence" and len(top_two_indices) > 1:
62
  inferred_class = class_names[top_two_indices[1]]
63
 
64
- answer_dict = {'file_name': url, 'class_name': inferred_class}
65
  return answer_dict
66
  except Exception as e:
67
  logging.error(f"Error processing {url}: {e}")
@@ -113,7 +113,7 @@ def process_audio(params):
113
  solutions.append(result)
114
 
115
  result_url = f"{api}/{job_id}"
116
- # send_results_to_api(solutions, result_url)
117
 
118
  return json.dumps({"solutions": solutions}, indent=4)
119
 
 
61
  if inferred_class == "Silence" and len(top_two_indices) > 1:
62
  inferred_class = class_names[top_two_indices[1]]
63
 
64
+ answer_dict = {'audio_url': url, 'answer': [inferred_class]}
65
  return answer_dict
66
  except Exception as e:
67
  logging.error(f"Error processing {url}: {e}")
 
113
  solutions.append(result)
114
 
115
  result_url = f"{api}/{job_id}"
116
+ send_results_to_api(solutions, result_url)
117
 
118
  return json.dumps({"solutions": solutions}, indent=4)
119