satyamr196 commited on
Commit
8e62829
·
1 Parent(s): 25106b9

minor bug : double quotes inside double quotes not allowed in csv_path string

Browse files
ASR_Server.py CHANGED
@@ -27,8 +27,8 @@ job_status = {
27
  }
28
 
29
  csv_path = "test.csv"
30
- csv_transcript = f"test_with_{ASR_model.replace("/","_")}.csv"
31
- csv_result = f"test_with_{ASR_model.replace("/","_")}_WER.csv"
32
  df = pd.read_csv(csv_path)
33
  print(f"CSV Loaded with {len(df)} rows")
34
 
@@ -184,8 +184,8 @@ def get_status():
184
  @app.route('/api', methods=['GET'])
185
  def api():
186
  model = request.args.get('ASR_model', default="", type=str)
187
- csv_transcript = f"test_with_{model.replace("/","_")}.csv"
188
- csv_result = f"test_with_{model.replace("/","_")}_WER.csv"
189
  if not model:
190
  return jsonify({'error': 'ASR_model parameter is required'}), 400 # Return 400 if model is missing
191
  elif (download_csv(csv_transcript) is not None):
 
27
  }
28
 
29
  csv_path = "test.csv"
30
+ csv_transcript = f'test_with_{ASR_model.replace("/", "_")}.csv'
31
+ csv_result = f'test_with_{ASR_model.replace("/","_")}_WER.csv'
32
  df = pd.read_csv(csv_path)
33
  print(f"CSV Loaded with {len(df)} rows")
34
 
 
184
  @app.route('/api', methods=['GET'])
185
  def api():
186
  model = request.args.get('ASR_model', default="", type=str)
187
+ csv_transcript = f'test_with_{model.replace("/","_")}.csv'
188
+ csv_result = f'test_with_{model.replace("/","_")}_WER.csv'
189
  if not model:
190
  return jsonify({'error': 'ASR_model parameter is required'}), 400 # Return 400 if model is missing
191
  elif (download_csv(csv_transcript) is not None):
utils/generate_box_plot.py CHANGED
@@ -3,7 +3,7 @@ from utils.load_csv import download_csv
3
  def box_plot_data(ASR_model):
4
 
5
  # Load the CSV file
6
- csv_result = f"test_with_{ASR_model.replace("/","_")}_WER.csv"
7
  df = download_csv(csv_result)
8
 
9
  # Display actual column names to check for issues
 
3
  def box_plot_data(ASR_model):
4
 
5
  # Load the CSV file
6
+ csv_result = f'test_with_{ASR_model.replace("/","_")}_WER.csv'
7
  df = download_csv(csv_result)
8
 
9
  # Display actual column names to check for issues
utils/generate_results.py CHANGED
@@ -24,7 +24,7 @@ def generateResults(ASR_model):
24
 
25
 
26
  # Load the CSV with whisper transcripts f"test_with_{ASR_model}.csv"
27
- csv_transcript = f"test_with_{ASR_model.replace("/","_")}.csv"
28
  # Read the CSV file
29
  df = download_csv(csv_transcript)
30
 
@@ -64,7 +64,7 @@ def generateResults(ASR_model):
64
  print("Column 'transcript' not found in CSV")
65
 
66
  # Save the updated CSV
67
- csv_result = f"test_with_{ASR_model.replace("/","_")}_WER.csv"
68
  upload_csv(df,csv_result)
69
 
70
  print(f"WER calculations saved to {csv_result}")
 
24
 
25
 
26
  # Load the CSV with whisper transcripts f"test_with_{ASR_model}.csv"
27
+ csv_transcript = f'test_with_{ASR_model.replace("/","_")}.csv'
28
  # Read the CSV file
29
  df = download_csv(csv_transcript)
30
 
 
64
  print("Column 'transcript' not found in CSV")
65
 
66
  # Save the updated CSV
67
+ csv_result = f'test_with_{ASR_model.replace("/","_")}_WER.csv'
68
  upload_csv(df,csv_result)
69
 
70
  print(f"WER calculations saved to {csv_result}")