Pendrokar commited on
Commit
4d2ffb1
β€’
1 Parent(s): af75fe2

em value comma fix

Browse files
Files changed (2) hide show
  1. app.py +10 -4
  2. gr_client.py +10 -4
app.py CHANGED
@@ -176,10 +176,16 @@ class LocalBlocksDemo(BlocksDemo):
176
  + '</td> '
177
  arpabet_html += '<tr></tbody></table>'
178
 
179
- em_angry = round(json_data['em_angry'][0], 2),
180
- em_happy = round(json_data['em_happy'][0], 2),
181
- em_sad = round(json_data['em_sad'][0], 2),
182
- em_surprise = round(json_data['em_surprise'][0], 2),
 
 
 
 
 
 
183
 
184
  return [
185
  save_path,
 
176
  + '</td> '
177
  arpabet_html += '<tr></tbody></table>'
178
 
179
+ if use_deepmoji:
180
+ em_angry = round(json_data['em_angry'][0], 2)
181
+ em_happy = round(json_data['em_happy'][0], 2)
182
+ em_sad = round(json_data['em_sad'][0], 2)
183
+ em_surprise = round(json_data['em_surprise'][0], 2)
184
+ else:
185
+ em_angry = anger
186
+ em_happy = happy
187
+ em_sad = sad
188
+ em_surprise = surprise
189
 
190
  return [
191
  save_path,
gr_client.py CHANGED
@@ -578,10 +578,16 @@ class BlocksDemo:
578
  + '</td> '
579
  arpabet_html += '<tr></tbody></table>'
580
 
581
- em_angry = round(json_data['em_angry'][0], 2),
582
- em_happy = round(json_data['em_happy'][0], 2),
583
- em_sad = round(json_data['em_sad'][0], 2),
584
- em_surprise = round(json_data['em_surprise'][0], 2),
 
 
 
 
 
 
585
 
586
  return [
587
  wav_path,
 
578
  + '</td> '
579
  arpabet_html += '<tr></tbody></table>'
580
 
581
+ if use_deepmoji:
582
+ em_angry = round(json_data['em_angry'][0], 2)
583
+ em_happy = round(json_data['em_happy'][0], 2)
584
+ em_sad = round(json_data['em_sad'][0], 2)
585
+ em_surprise = round(json_data['em_surprise'][0], 2)
586
+ else:
587
+ em_angry = anger
588
+ em_happy = happy
589
+ em_sad = sad
590
+ em_surprise = surprise
591
 
592
  return [
593
  wav_path,