asigalov61 commited on
Commit
ee46fa2
·
verified ·
1 Parent(s): 034fb74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -20
app.py CHANGED
@@ -62,25 +62,6 @@ def format_table_data(data_string):
62
 
63
  #==========================================================================================================
64
 
65
- def clean_string(original_string,
66
- regex=r'[^a-zA-Z0-9.() \n]',
67
- remove_duplicate_spaces=True,
68
- title=False
69
- ):
70
-
71
- cstr1 = re.sub(regex, '', original_string)
72
-
73
- if title:
74
- cstr1 = cstr1.title()
75
-
76
- if remove_duplicate_spaces:
77
- return re.sub(r'[ ]+', ' ', cstr1).strip()
78
-
79
- else:
80
- return cstr1
81
-
82
- #==========================================================================================================
83
-
84
  def ID_MIDI(input_midi):
85
 
86
  print('*' * 70)
@@ -153,7 +134,7 @@ def ID_MIDI(input_midi):
153
 
154
  output_midi_src_dataset = output_entry[0]
155
 
156
- output_midi_path_str = clean_string(output_entry[1])
157
 
158
  client = InferenceClient(api_key=HF_TOKEN)
159
 
 
62
 
63
  #==========================================================================================================
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  def ID_MIDI(input_midi):
66
 
67
  print('*' * 70)
 
134
 
135
  output_midi_src_dataset = output_entry[0]
136
 
137
+ output_midi_path_str = TMIDIX.clean_string(output_entry[1], regex=r'[^a-zA-Z0-9.() \n]')
138
 
139
  client = InferenceClient(api_key=HF_TOKEN)
140